Skip to content

Commit 0a81cfe

Browse files
chore(deps): update dependency @cucumber/compatibility-kit to v25 (#2692)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: David Goss <[email protected]>
1 parent 5e0e7af commit 0a81cfe

File tree

12 files changed

+103
-54
lines changed

12 files changed

+103
-54
lines changed

compatibility/cck_spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,18 @@ const CCK_FEATURES_PATH = 'node_modules/@cucumber/compatibility-kit/features'
1717
const CCK_IMPLEMENTATIONS_PATH = 'compatibility/features'
1818

1919
const UNSUPPORTED = [
20+
// we aren't fully compliant yet for global hooks
2021
'global-hooks-attachments',
2122
'global-hooks-beforeall-error',
2223
'global-hooks-afterall-error',
24+
// not a test sample
25+
'test-run-exception',
26+
// suggestions not implemented yet
27+
'examples-tables-undefined',
28+
'hooks-undefined',
29+
'retry-undefined',
30+
'undefined',
31+
'unknown-parameter-type',
2332
]
2433

2534
config.truncateThreshold = 100
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Given } from '../../../src'
22

3-
Given(/a (.*?) with (.*?)/, function () {
3+
Given(/^a (.*?) with (.*?)$/, function () {
44
// first one
55
})
66

7-
Given(/a step with (.*)/, function () {
7+
Given(/^a step with (.*)$/, function () {
88
// second one
99
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import assert from 'node:assert'
2+
import { Given, When, Then } from '../../../src'
3+
4+
Given('there are {int} cucumbers', function (initialCount) {
5+
this.count = initialCount
6+
})
7+
8+
When('I eat {int} cucumbers', function (eatCount) {
9+
this.count -= eatCount
10+
})
11+
12+
Then('I should have {int} cucumbers', function (expectedCount) {
13+
assert.strictEqual(this.count, expectedCount)
14+
})
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { After, Before, When } from '../../../src'
2+
3+
Before({}, function () {
4+
// no-op
5+
})
6+
7+
Before({ tags: '@skip-before' }, function () {
8+
return 'skipped'
9+
})
10+
11+
Before({}, function () {
12+
// no-op
13+
})
14+
15+
When('a normal step', function () {
16+
// no-op
17+
})
18+
19+
When('a step that skips', function () {
20+
return 'skipped'
21+
})
22+
23+
After({}, function () {
24+
// no-op
25+
})
26+
27+
After({ tags: '@skip-after' }, function () {
28+
return 'skipped'
29+
})
30+
31+
After({}, function () {
32+
// no-op
33+
})
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Before, After } from '../../../src'
2+
3+
Before({}, () => {
4+
// no-op
5+
})
6+
7+
After({}, () => {
8+
// no-op
9+
})
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('an ambiguous step', function () {
4+
// first one
5+
})
6+
7+
Given('an ambiguous step', function () {
8+
// second one
9+
})
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 pending step', function () {
4+
return 'pending'
5+
})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// There are intentionally no steps defined for this sample

compatibility/features/retry/retry.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,3 @@ 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-
})

compatibility/features/skipped/skipped.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import { Before, Given } from '../../../src'
2-
3-
Before('@skip', function () {
4-
return 'skipped'
5-
})
1+
import { Given } from '../../../src'
62

73
Given('a step that does not skip', function () {
84
// no-op

0 commit comments

Comments
 (0)