Skip to content

Commit 7fb648e

Browse files
committed
test: cache initial setup vars
1 parent 700af6e commit 7fb648e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/diff-so-fancy.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ __load_imports__() {
99

1010
setup_file() {
1111
__load_imports__
12+
set_env
13+
# bats fails to handle our multiline result, so we save to $output ourselves
14+
__dfs_cached_output="$( load_fixture "ls-function" | $diff_so_fancy )"
15+
export __dfs_cached_output
1216
}
1317

1418
setup() {
1519
__load_imports__
16-
17-
set_env
18-
19-
# bats fails to handle our multiline result, so we save to $output ourselves
20-
output=$( load_fixture "ls-function" | $diff_so_fancy )
20+
output="${__dfs_cached_output}"
2121
}
2222

2323
@test "diff-so-fancy runs and exits without error" {

0 commit comments

Comments
 (0)