-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update cucumber packages and fix CCK (#2351)
- Loading branch information
1 parent
6eede88
commit 835215e
Showing
11 changed files
with
161 additions
and
173 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
colors: true | ||
fail-zero: true | ||
file: | ||
- test/test_helper.ts | ||
full-trace: true | ||
|
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,13 @@ | ||
import { Given } from '../../../src' | ||
|
||
Given('an implemented step', function () { | ||
Given('an implemented non-pending step', function () { | ||
// no-op | ||
}) | ||
|
||
Given('a step that isnt implemented yet', function () { | ||
return 'pending' | ||
Given('an implemented step that is skipped', function () { | ||
// no-op | ||
}) | ||
|
||
Given('a step that we expect to be skipped', function () { | ||
// no-op | ||
Given('an unimplemented pending step', function () { | ||
return 'pending' | ||
}) |
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,42 +1,28 @@ | ||
import assert from 'node:assert' | ||
import { Given, When, Then } from '../../../src' | ||
|
||
Given( | ||
'there are {int} {float} coins inside', | ||
function (count: number, denomination: number) { | ||
// TODO: implement this | ||
assert(count) | ||
assert(denomination) | ||
} | ||
) | ||
Given('the customer has {int} cents', function (money) { | ||
this.money = money | ||
}) | ||
|
||
Given('there are no chocolates inside', function () { | ||
// TODO: implement this | ||
Given('there are chocolate bars in stock', function () { | ||
this.stock = ['Mars'] | ||
}) | ||
|
||
Given('there are {int} chocolates inside', function (chocolateCount: number) { | ||
// TODO: implement this | ||
assert(chocolateCount) | ||
Given('there are no chocolate bars in stock', function () { | ||
this.stock = [] | ||
}) | ||
|
||
When( | ||
'the customer tries to buy a {float} chocolate with a {float} coin', | ||
function (price: number, paid: number) { | ||
// TODO: implement this | ||
assert(price) | ||
assert(paid) | ||
When('the customer tries to buy a {int} cent chocolate bar', function (price) { | ||
if (this.money >= price) { | ||
this.chocolate = this.stock.pop() | ||
} | ||
) | ||
}) | ||
|
||
Then('the sale should not happen', function () { | ||
// TODO: implement this | ||
assert.strictEqual(this.chocolate, undefined) | ||
}) | ||
|
||
Then( | ||
"the customer's change should be {int} {float} coin(s)", | ||
function (count: number, denomination: number) { | ||
// TODO: implement this | ||
assert(count) | ||
assert(denomination) | ||
} | ||
) | ||
Then('the sale should happen', function () { | ||
assert.ok(this.chocolate) | ||
}) |
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.