mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-10-26 23:32:02 +03:00
74b64c89da
I enable this mode only on CI for now. Not to `yarn test`. Since it is locked to a particular version of Node so we don't want to force people to run it locally.
18 lines
597 B
Bash
18 lines
597 B
Bash
# Prepack test input
|
|
node ./bin/prepack.js ./test/node-cli/Simple.js --out Simple-test.js --compatibility node-cli
|
|
# Run the resulting program and check it for expected output
|
|
node ./Simple-test.js | grep "Hey world" > /dev/null
|
|
if [[ $? -ne 0 ]]; then
|
|
exit 1
|
|
fi
|
|
rm ./Simple-test.js
|
|
|
|
# Prepack test input
|
|
node ./bin/prepack.js ./test/node-cli/FileSystem.js --out FileSystem-test.js --compatibility node-cli
|
|
# Run the resulting program and check it for expected output
|
|
node ./FileSystem-test.js | grep "Hey Hello world" > /dev/null
|
|
if [[ $? -ne 0 ]]; then
|
|
exit 1
|
|
fi
|
|
rm ./FileSystem-test.js
|