aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 01:25:53 +0800
committerGitHub <noreply@github.com>2017-05-30 01:25:53 +0800
commit7b9e8777f1915191aaf28a83a86b4a35d74dd930 (patch)
tree3d6e6242b8c914911b73d68d9458cafaeaf59183
parentf4047dbe187f4eeec09ad9c90107b0f7eaea22a8 (diff)
parentc820e873f1370389eaafe2db164101c92d15077e (diff)
downloaddexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar.gz
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar.bz2
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar.lz
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar.xz
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.tar.zst
dexon-sol-tools-7b9e8777f1915191aaf28a83a86b4a35d74dd930.zip
Merge pull request #19 from 0xProject/test-commands-refactor
Refactor test commands
-rw-r--r--circle.yml1
-rw-r--r--package.json23
2 files changed, 13 insertions, 11 deletions
diff --git a/circle.yml b/circle.yml
index b6a9efeb1..448524aa1 100644
--- a/circle.yml
+++ b/circle.yml
@@ -10,4 +10,5 @@ test:
- cd ../contracts; git checkout 38c2b4c; npm install && npm run migrate
- npm run update_contracts
- npm run test:coverage
+ - npm run test:umd
- npm run lint
diff --git a/package.json b/package.json
index e5590886b..310ca4a8e 100644
--- a/package.json
+++ b/package.json
@@ -10,12 +10,14 @@
"exchange"
],
"scripts": {
- "build": "npm run clean && run-p build:*:prod",
+ "prebuild": "npm run clean",
+ "build": "run-p build:*:prod",
"lint": "tslint src/**/*.ts",
- "test": "run-s test:commonjs test:umd",
- "test:coverage": "nyc npm run test:commonjs --all",
+ "test": "run-s clean test:commonjs",
+ "test:umd": "run-s substitute_umd_bundle run_mocha; npm run clean",
+ "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 \"concert load couple harbor equip island argue ramp clarify fence smart topic\"",
+ "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"docs:json": "typedoc --json docs/index.json .",
"docs:generate": "typedoc --out docs .",
"docs:open": "opn docs/index.html",
@@ -25,15 +27,14 @@
"build:umd:dev": "webpack",
"build:umd:prod": "webpack -p",
"build:commonjs:dev": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;",
- "run_mocha": "mocha test_temp/test/**/*_test.js",
- "test:commonjs": "run-s build:commonjs:dev setup_commonjs run_mocha tear_down",
- "test:umd": "run-s build:*:dev setup_umd run_mocha tear_down",
- "setup_commonjs": "shx cp -r lib test_temp",
- "setup_umd": "shx mkdir -p test_temp/src && shx cp _bundles/* test_temp/src && shx cp -r lib/test test_temp/test",
- "tear_down": "shx rm -rf test_temp"
+ "test:commonjs": "run-s build:commonjs:dev run_mocha",
+ "pretest:umd": "run-s clean build:*:dev",
+ "substitute_umd_bundle": "shx rm -rf lib/src && shx mv _bundles lib/src",
+ "run_mocha": "mocha lib/test/**/*_test.js"
},
"config": {
- "artifacts": "Proxy Exchange TokenRegistry Token Mintable EtherToken"
+ "artifacts": "Proxy Exchange TokenRegistry Token Mintable EtherToken",
+ "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
},
"repository": {
"type": "git",