Add script to run UMD tests

This commit is contained in:
Leonid Logvinov
2017-06-05 13:26:52 +02:00
parent eb5c9ae708
commit f85f546f9f
2 changed files with 8 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
"build": "run-p build:*:prod",
"lint": "tslint src/*.ts test/*.ts",
"test": "run-s clean test:commonjs",
"test:umd": "run-s substitute_umd_bundle run_mocha; npm run clean",
"test:umd": "./scripts/test_umd.sh",
"test:coverage": "nyc npm run test --all",
"update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;",
"testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",

7
scripts/test_umd.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# This script runs umd tests and cleans up after them while preserving the `return_code` for CI
# UMD tests should be only run after the commonjs build cause they reuse some of the commonjs build artefacts
run-s substitute_umd_bundle run_mocha
return_code=$?
npm run clean
exit $return_code