Merge pull request #676 from 0xProject/feature/mocha-source-maps
Use source-map-support package to include correct line numbers in mocha
This commit is contained in:
commit
05fe8792ea
@ -43,7 +43,8 @@
|
||||
"lerna": "^2.5.1",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"prettier": "^1.11.1",
|
||||
"wsrun": "^2.2.0"
|
||||
"wsrun": "^2.2.0",
|
||||
"source-map-support": "^0.5.6"
|
||||
},
|
||||
"resolutions": {
|
||||
"ethereumjs-tx": "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default",
|
||||
|
@ -30,7 +30,7 @@
|
||||
"clean": "shx rm -rf _bundles lib test_temp scripts src/contract_wrappers/generated",
|
||||
"build:umd:prod": "NODE_ENV=production webpack",
|
||||
"build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
|
||||
"docs:stage": "node scripts/stage_docs.js",
|
||||
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
|
||||
|
@ -12,7 +12,7 @@
|
||||
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||
"clean": "shx rm -rf lib test_temp scripts",
|
||||
"lint": "tslint --project .",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
|
||||
"prepublishOnly": "run-p build",
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
|
@ -14,7 +14,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/*",
|
||||
|
@ -20,7 +20,7 @@
|
||||
"clean": "shx rm -rf lib test_temp scripts",
|
||||
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
|
||||
"lint": "tslint --project .",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
|
||||
"test": "run-s copy_test_fixtures run_mocha",
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
|
@ -24,7 +24,7 @@
|
||||
"update_compact_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
|
||||
"update_test_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;",
|
||||
"clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/contract_wrappers/generated",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
|
||||
},
|
||||
"config": {
|
||||
|
@ -18,7 +18,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s build test",
|
||||
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
|
||||
"run_mocha": "mocha 'lib/test/**/*.js' --timeout 100000 --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register 'lib/test/**/*.js' --timeout 100000 --bail --exit",
|
||||
"compile": "sol-compiler",
|
||||
"clean": "shx rm -rf lib src/contract_wrappers/generated",
|
||||
"generate_contract_wrappers":
|
||||
|
@ -13,7 +13,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"clean": "shx rm -rf lib scripts",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
|
||||
"clean": "shx rm -rf lib test_temp scripts",
|
||||
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
|
||||
|
@ -17,7 +17,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s build test",
|
||||
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit",
|
||||
"generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers",
|
||||
"coverage:report:text": "istanbul report text",
|
||||
"coverage:report:html": "istanbul report html && open coverage/index.html",
|
||||
|
@ -18,7 +18,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s build test",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"clean": "shx rm -rf lib scripts lib/src/artifacts src/generated_contract_wrappers",
|
||||
|
@ -25,7 +25,7 @@
|
||||
"update_compact_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
|
||||
"update_test_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;",
|
||||
"clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/generated_contract_wrappers",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
|
||||
},
|
||||
"config": {
|
||||
|
@ -14,7 +14,7 @@
|
||||
"update_contract_fixtures": "copyfiles 'test/fixtures/contracts/**/*' ./lib",
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s build test",
|
||||
"run_mocha": "mocha lib/test/*_test.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/*_test.js --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"clean": "shx rm -rf lib scripts",
|
||||
|
@ -17,7 +17,7 @@
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
|
||||
"clean": "shx rm -rf lib scripts test/fixtures/artifacts src/artifacts",
|
||||
"copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib",
|
||||
"compile_test": "sol-compiler compile",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
|
||||
"copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
|
||||
},
|
||||
"bin": {
|
||||
|
@ -12,8 +12,8 @@
|
||||
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||
"clean": "shx rm -rf lib scripts",
|
||||
"lint": "tslint --project .",
|
||||
"run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit",
|
||||
"run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit",
|
||||
"run_mocha_unit": "mocha --require source-map-support/register lib/test/unit/**/*_test.js --timeout 10000 --bail --exit",
|
||||
"run_mocha_integration": "mocha --require source-map-support/register lib/test/integration/**/*_test.js --timeout 10000 --bail --exit",
|
||||
"test": "npm run test:unit",
|
||||
"test:unit:coverage": "nyc npm run test:unit --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s clean build test",
|
||||
"test:circleci": "yarn test:coverage",
|
||||
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
|
||||
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
|
||||
|
@ -10802,6 +10802,13 @@ source-map-support@^0.5.0, source-map-support@^0.5.3:
|
||||
dependencies:
|
||||
source-map "^0.6.0"
|
||||
|
||||
source-map-support@^0.5.6:
|
||||
version "0.5.6"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
source-map-url@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
|
||||
|
Loading…
x
Reference in New Issue
Block a user