Skip to content

Commit 1279ef7

Browse files
authored
Align with latest compatibility kit (#2641)
1 parent a36bf46 commit 1279ef7

File tree

25 files changed

+125
-17
lines changed

25 files changed

+125
-17
lines changed

.mocharc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ file:
44
- test/test_helper.ts
55
full-trace: true
66
forbid-only: true
7-
forbid-pending: true
87
recursive: true
98
reporter: dot
109
require: 'ts-node/register'

compatibility/cck_spec.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ const PROJECT_PATH = path.join(__dirname, '..')
1616
const CCK_FEATURES_PATH = 'node_modules/@cucumber/compatibility-kit/features'
1717
const CCK_IMPLEMENTATIONS_PATH = 'compatibility/features'
1818

19+
const UNSUPPORTED = [
20+
// we don't support global hooks messages yet
21+
'global-hooks',
22+
'global-hooks-attachments',
23+
'global-hooks-beforeall-error',
24+
'global-hooks-afterall-error',
25+
]
26+
1927
config.truncateThreshold = 100
2028
use(chaiExclude)
2129

@@ -25,6 +33,11 @@ describe('Cucumber Compatibility Kit', () => {
2533
for (const directory of directories) {
2634
const suite = path.basename(directory)
2735

36+
if (UNSUPPORTED.includes(suite)) {
37+
it.skip(suite, () => {})
38+
continue
39+
}
40+
2841
it(suite, async () => {
2942
const actualMessages: Envelope[] = []
3043
const stdout = new PassThrough()
@@ -38,7 +51,7 @@ describe('Cucumber Compatibility Kit', () => {
3851
],
3952
names: [],
4053
tagExpression: '',
41-
order: 'defined',
54+
order: suite === 'multiple-features-reversed' ? 'reverse' : 'defined',
4255
shard: '',
4356
},
4457
support: {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Given } from '../../../src'
2+
3+
Given(/a (.*?) with (.*?)/, function () {
4+
// first one
5+
})
6+
7+
Given(/a step with (.*)/, function () {
8+
// second one
9+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Given, When, Then } from '../../../src'
2+
3+
Given('an order for {string}', (thing: string) => {
4+
// no-op
5+
})
6+
7+
When('an action', () => {
8+
// no-op
9+
})
10+
11+
Then('an outcome', () => {
12+
// no-op
13+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Given } from '../../../src'
2+
3+
Given('a doc string:', (docString: string) => {
4+
// no-op
5+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Given } from '../../../src'
2+
3+
Given('an order for {string}', (thing: string) => {
4+
// no-op
5+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Given } from '../../../src'
2+
3+
Given('an order for {string}', (thing: string) => {
4+
// no-op
5+
})
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Given } from '../../../src'
2+
3+
Given(
4+
/^a (.*?)(?: and a (.*?))?(?: and a (.*?))?$/,
5+
function (vegtable1: string, vegtable2: string, vegtable3: string) {
6+
// no-op
7+
}
8+
)

compatibility/features/retry/retry.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ Given('a step that passes the third time', function () {
2323
Given('a step that always fails', function () {
2424
throw new Error('Exception in step')
2525
})
26+
27+
Given('an ambiguous step', function () {
28+
// first one
29+
})
30+
31+
Given('an ambiguous step', function () {
32+
// second one
33+
})
34+
35+
Given('a pending step', function () {
36+
return 'pending'
37+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Given, When, Then } from '../../../src'
2+
3+
Given('an order for {string}', (thing: string) => {
4+
// no-op
5+
})
6+
7+
When('an action', () => {
8+
// no-op
9+
})
10+
11+
Then('an outcome', () => {
12+
// no-op
13+
})

0 commit comments

Comments
 (0)