-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1414 from cucumber/json-schema
Json schema for message protocol
- Loading branch information
Showing
34 changed files
with
475 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { messages } from '@cucumber/messages' | ||
import * as messages from '@cucumber/messages' | ||
import TestStep from './TestStep' | ||
|
||
export default class EmptyPickleTestStep extends TestStep { | ||
public toMessage(): messages.TestCase.ITestStep { | ||
return new messages.TestCase.TestStep({ | ||
public toMessage(): messages.TestStep { | ||
return { | ||
id: this.id, | ||
}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { messages } from '@cucumber/messages' | ||
import * as messages from '@cucumber/messages' | ||
import TestStep from './TestStep' | ||
|
||
export default class HookTestStep extends TestStep { | ||
public toMessage(): messages.TestCase.ITestStep { | ||
const testStep = new messages.TestCase.TestStep({ | ||
public toMessage(): messages.TestStep { | ||
return { | ||
id: this.id, | ||
hookId: this.sourceId, | ||
}) | ||
testStep.pickleStepId = undefined | ||
return testStep | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export default interface IParameterTypeDefinition { | ||
name: string | ||
regexp: RegExp | ReadonlyArray<RegExp> | string | ReadonlyArray<string> | ||
regexp: RegExp | readonly RegExp[] | string | readonly string[] | ||
type?: any | ||
transformer?: (...args: ReadonlyArray<string>) => any | ||
transformer?: (...args: readonly string[]) => any | ||
preferForRegexpMatch?: boolean | ||
useForSnippets?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import TestStep from './TestStep' | ||
import { messages } from '@cucumber/messages' | ||
import * as messages from '@cucumber/messages' | ||
|
||
export default class PickleTestStep extends TestStep { | ||
public toMessage(): messages.TestCase.ITestStep { | ||
return new messages.TestCase.TestStep({ | ||
public toMessage(): messages.TestStep { | ||
return { | ||
id: this.id, | ||
pickleStepId: this.sourceId, | ||
stepDefinitionIds: this.supportCodeExecutors.map( | ||
(supportCodeExecutor) => supportCodeExecutor.stepDefinitionId | ||
), | ||
stepMatchArgumentsLists: this.supportCodeExecutors.map( | ||
(e) => | ||
new messages.TestCase.TestStep.StepMatchArgumentsList({ | ||
stepMatchArguments: e.argsToMessages().slice(), | ||
}) | ||
), | ||
}) | ||
stepMatchArgumentsLists: this.supportCodeExecutors.map((e) => ({ | ||
stepMatchArguments: e.argsToMessages().slice(), | ||
})), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.