-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d26a3ae
commit 8c10119
Showing
4 changed files
with
46 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
export def "test that after each gets context from test" [] { | ||
let context = { some: stuff, that: is, useful: for, multiple: tests } | ||
$context | ||
} | ||
|
||
export def "test that after each context gets passed to multiple tests" [] { | ||
let context = { some: stuff, that: is, useful: for, multiple: tests } | ||
$context | ||
} | ||
|
||
export def "after each" [] { | ||
let actual = $in | ||
let expected = { some: stuff, that: is, useful: for, multiple: tests } | ||
use std assert | ||
|
||
print "after each happened" | ||
|
||
assert equal $expected $actual | ||
} | ||
|
||
export def "verify json results" [] { | ||
let results = $in | ||
use std assert | ||
|
||
assert ($results | get exit_code | all {|it| $it == 0}) | ||
assert ($results | get stdout | all {|it| $it =~ "after each happened"}) | ||
} | ||
|
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