Add TypeScript example
This commit is contained in:
5
ts/features/composition.feature
Normal file
5
ts/features/composition.feature
Normal file
@ -0,0 +1,5 @@
|
||||
Feature: TypeScript step definitions
|
||||
|
||||
Scenario:
|
||||
When the step definitions are written in TypeScript
|
||||
Then I don't get a warning about undefined steps
|
10
ts/features/steps/composition.ts
Normal file
10
ts/features/steps/composition.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { When, Then } from 'cucumber';
|
||||
import { expect } from 'chai';
|
||||
|
||||
When('the step definitions are written in {word}', function (language: string) {
|
||||
this.language = language
|
||||
});
|
||||
|
||||
Then("I don't get a warning about undefined steps", function () {
|
||||
expect(this.language).to.equal('TypeScript')
|
||||
});
|
Reference in New Issue
Block a user