Skip to content

Commit

Permalink
chore(package): integrate test script
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Oct 25, 2017
1 parent 07df85a commit a4fe70d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ script:
- npm test

after_success:
- if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi
- if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && npx nyc report --reporter=text-lcov | npx coveralls; fi
- if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ install:
- npm install

build_script:
- npm run build_spec
- npm run build_all

test_script:
- npm run cover
- npm test

version: "{build}"
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"exclude": [
"node_modules",
"dist",
"typings",
"*.d.ts",
"src/**/MiscJSDoc.ts"
Expand All @@ -26,7 +27,6 @@
"ts-node/register"
],
"reporter": [
"json",
"html"
],
"all": true
Expand All @@ -52,7 +52,6 @@
"build_perf": "Build CJS & Global build, run macro performance test",
"build_test": "Build CJS package & test spec, execute mocha test runner",
"build_docs": "Build ESM2015 & global package, create documentation using it",
"build_spec": "Build test specs",
"check_circular_dependencies": "Check codebase has circular dependencies",
"clean_dist_cjs": "Clean up existing CJS package output",
"clean_dist_esm5": "Clean up existing ESM/ES5 package output",
Expand Down Expand Up @@ -89,8 +88,7 @@
"build_global": "npm-run-all clean_dist_global build_esm5_for_rollup && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_esm5_for_rollup",
"build_umd": "npm-run-all clean_dist_global && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core",
"build_perf": "webdriver-manager update && npm-run-all build_cjs build_global perf",
"build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015",
"build_spec": "tsc --project ./spec --pretty",
"build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015",
"build_spec_browser": "webpack --config spec/support/webpack.mocha.config.js",
"check_circular_dependencies": "madge ./dist/cjs --circular",
"clean_dist": "shx rm -rf ./dist",
Expand All @@ -105,7 +103,7 @@
"compile_dist_esm2015": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm2015 --target es2015 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
"compile_dist_esm2015_for_docs": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts ./dist/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
"compile_dist_esm5_for_rollup": "tsc ./dist/src/Rx.ts ./dist/src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5_for_rollup --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers",
"copy_sources": "mkdir -p dist && rsync -a ./src/ ./dist/src",
"copy_sources": "mkdirp dist && shx cp -r ./src/ ./dist/src",
"decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..",
"doctoc": "doctoc CONTRIBUTING.md",
"generate_packages": "node .make-packages.js",
Expand All @@ -118,9 +116,9 @@
"prepublish": "shx rm -rf ./typings && typings install && npm run build_all",
"publish_docs": "./publish_docs.sh",
"test_browser": "npm-run-all build_spec_browser && opn spec/support/mocha-browser-runner.html",
"test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts '.out/spec/**/*-spec.js'",
"test:cover": "nyc mocha --compilers ts:ts-node/register --opts spec/support/coverage.opts 'spec/**/*-spec.ts'",
"tests2png": "npm run build_spec && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js",
"test": "shx rm -rf ./.out && tsc && mocha --opts spec/support/default.opts \".out/spec/**/*-spec.js\"",
"test:cover": "nyc mocha --compilers ts:ts-node/register --opts spec/support/coverage.opts \"spec/**/*-spec.ts\"",
"tests2png": "tsc && mkdirp tmp/docs/img && mkdirp spec-js/support && shx cp spec/support/*.opts spec-js/support/ && mocha --opts spec/support/tests2png.opts spec-js",
"watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion spec/support/coverage.opts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
--globals WebSocket,FormData,XDomainRequest,ActiveXObject

--recursive
--timeout 5000
--timeout 5000
2 changes: 0 additions & 2 deletions spec/support/default.opts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
--require source-map-support/register
--require .out/spec/helpers/testScheduler-ui.js
--ui .out/spec/helpers/testScheduler-ui.js

--reporter dot

--full-trace
--check-leaks
--globals WebSocket,FormData,XDomainRequest,ActiveXObject

Expand Down

0 comments on commit a4fe70d

Please sign in to comment.