Wei Zhu
7 years ago
6 changed files with 71 additions and 33 deletions
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
set -x |
|||
|
|||
if [ "$REACT" = 15 ]; then |
|||
npm i --no-save react@15 react-dom@15 react-test-renderer@15 enzyme-adapter-react-15 |
|||
fi |
@ -0,0 +1,34 @@ |
|||
#!/bin/bash |
|||
|
|||
set -x |
|||
set -e |
|||
|
|||
run_test() { |
|||
if [ "$REACT" != 16 ]; then |
|||
npm test -- -w 2 -u $* |
|||
else |
|||
npm test -- -w 2 $* |
|||
fi |
|||
} |
|||
|
|||
if [ "$TEST_TYPE" = lint ]; then |
|||
npm run lint |
|||
elif [ "$TEST_TYPE" = test:dist ]; then |
|||
npm run dist |
|||
node ./tests/dekko/dist.test.js |
|||
LIB_DIR=dist run_test |
|||
elif [ "$TEST_TYPE" = test:lib ]; then |
|||
npm run compile |
|||
node ./tests/dekko/lib.test.js |
|||
LIB_DIR=lib run_test |
|||
elif [ "$TEST_TYPE" = test:es ]; then |
|||
npm run compile |
|||
LIB_DIR=es run_test |
|||
elif [ "$TEST_TYPE" = test:dom ]; then |
|||
run_test --coverage |
|||
if [ "$REACT" = 16 ]; then |
|||
bash <(curl -s https://codecov.io/bash) |
|||
fi |
|||
elif [ "$TEST_TYPE" = test:node ]; then |
|||
npm run test-node -- -w 2 -u |
|||
fi |
Loading…
Reference in new issue