Uh oh!
There was an error while loading. Please reload this page.
refactor(e2e): turn repeated test (build and start) into function - #312
refactor(e2e): turn repeated test (build and start) into function#312Jiansen wants to merge 1 commit into
Conversation
mxstbr
commented
Aug 1, 2016
TIL you can have functions in bash scripts! |
Jiansen
commented
Aug 1, 2016
There was a problem hiding this comment.
When would it be empty? We seem to always pass it.
There was a problem hiding this comment.
Yes, we always passed in snap file path in the 3 tests.
I am thinking what the build_check should behave when it is called without given $1.
-- option 1: delete the if check, let the function fall and let developer knows that Jest test is mandatory
-- option 2: use the following code, skip Jest test when there is no $1
if [ -z "$1" ]
then
test -e $1
fi
I will update the code when received your suggestion.
There was a problem hiding this comment.
This is just an end-to-end test that we run for this tool, the developer won’t see it.
So relying on jest existing is fine here.
gaearon
commented
Sep 2, 2016
Thanks again for the PR. Sorry it’s getting out of date. There are a few more important changes I wanted to get in first but I’m keeping an eye on this one. It should be good to go after #419 is merged so I’ll get back to it and ask you to update 😄 . Thank you! |
Jiansen
commented
Sep 2, 2016
This PR is to clean up e2e.sh. It makes sense to do this after other important changes. |
gaearon
commented
Sep 30, 2016
I’m closing because this got out of date. |
There are 3 build-and-start tests in the current
e2e.sh.I placed repeated code in a function.
In the first test, if there is a reason why
npm start -- --smoke-testshould run beforenpm run build, I will extractnpm start -- --smoke-testout of functionbuild_check.