-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
16 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Changelog | ||
|
||
## v5.0.3 2019-10-07 | ||
|
||
- Use `mocha-steps` for testing. | ||
|
||
## v5.0.2 2019-10-07 | ||
|
||
- Updated dependencies. | ||
|
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,20 +1,21 @@ | ||
import Mocha from "mocha" | ||
import * as MochaSteps from "mocha-steps" | ||
|
||
export function Feature(what: string, how: () => void): Mocha.Suite { | ||
return describe("Feature: " + what, how) | ||
return Mocha.describe("Feature: " + what, how) | ||
} | ||
export function Scenario(what: string, how: () => void): Mocha.Suite { | ||
return describe("Scenario: " + what, how) | ||
return Mocha.describe("Scenario: " + what, how) | ||
} | ||
export function Given(what: string, how: (done: Mocha.Done) => void): Mocha.Test { | ||
return it("Given " + what, how) | ||
return MochaSteps.step("Given " + what, how) | ||
} | ||
export function When(what: string, how: (done: Mocha.Done) => void): Mocha.Test { | ||
return it("When " + what, how) | ||
return MochaSteps.step("When " + what, how) | ||
} | ||
export function Then(what: string, how: (done: Mocha.Done) => void): Mocha.Test { | ||
return it("Then " + what, how) | ||
return MochaSteps.step("Then " + what, how) | ||
} | ||
export function And(what: string, how: (done: Mocha.Done) => void): Mocha.Test { | ||
return it("And " + what, how) | ||
return MochaSteps.step("And " + what, how) | ||
} |