Skip to content

Commit

Permalink
Fix failing interactive exec test
Browse files Browse the repository at this point in the history
Due to a change of the typical-project fixture, a test of the interactive
exec feature started failing. Arguably, this test was bad to begin with,
relying on the frailty of the typical-project fixture to simulate a failing
build. Instead, we simply change some of the code in the typical-project
fixture in the test, to provoka a build failure and thus create the context
for the interactive exec test.
  • Loading branch information
mstade committed Mar 1, 2018
1 parent aa56ed7 commit 7ddb54c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ js – src/a.js -> lib/a.js,lib/a.js.map
success!
js – src/added.js -> lib/added.js,lib/added.js.map
success!
js – src/b.js: Unexpected token, expected { (8:7)
js – src/added.js -> lib/added.js,lib/added.js.map
success!
js – src/b.js: Unexpected token, expected ; (8:18)
6 | }
7 |
> 8 | export all from foo
| ^
9 | export default 'b'
7 |
> 8 | export default 'b'export all from foo
| ^
9 | 
3 changes: 2 additions & 1 deletion test/cli/interactive-exec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ teardown() {
rm *.{pid,log}
fi

git checkout .
unload_fixture typical-project
}

Expand All @@ -45,6 +46,6 @@ teardown() {
}

@test "'ez-build --interactive \"echo success!\"' should only execute command on successful builds" {
touch src/b.js
echo "export all from foo" >> src/b.js
eventually 'assert_expected "$(cat build.log)"'
}

0 comments on commit 7ddb54c

Please sign in to comment.