Skip to content

Commit

Permalink
npm test execute both node and browser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cancerberoSgx committed Nov 15, 2018
1 parent 957a27b commit 9fc0cf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 7 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ steps:
sudo npm i -g n
sudo n latest
echo "installed latest node version `node -v`"
echo "installed latest npm version `npm -v`"
echo "installed latest npm version `npm -v`"
displayName: install node latest

- script: |
echo "npm install with node version `node -v`"
echo "npm install with npm version `npm -v`"
echo "node version `node -v`"
echo "npm version `npm -v`"
npm install
displayName: npm install

Expand All @@ -28,13 +28,11 @@ steps:
# docker run -v "$PWD":/code --rm --workdir /code node node /code/node.js
# displayName: test wasm with nodejs

- script: npm test
- script: |
echo "node version `node -v`"
echo "npm version `npm -v`"
npm test
displayName: run tests


- script: npm run test-browser
displayName: run tests in browser


- script: cp magick* $(Build.ArtifactStagingDirectory)
displayName: cp magick files to artifact staging directory
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"scripts": {
"test": "(cd tests/rotate && node node)",
"build-wasm": "docker build -t wasm-imagemagick-build-tools . && docker run --rm --workdir /code -v \"$PWD\":/code wasm-imagemagick-build-tools bash ./build.sh",
"build-ts": "tsc",
"build": "npm run build-wasm && npm run build-ts && npm run magickApiJs",
"build-ts": "tsc && npm run magickApiJs",
"build": "npm run build-wasm && npm run build-ts",
"prepare": "npm run build && npm run copy",
"copy": "cp magick.js magick.wasm dist && cp magick.js magick.wasm spec/assets",
"magickApiJs": "tsc src/magickApi.ts --lib dom,es6 --target es2018 --outdir .",
"clean": "sh clean.sh",
"test": "npm run test-node && npm run test-browser",
"test-node": "cd tests/rotate && node node",
"test-browser": "npm run test-browser-build && gulp --gulpfile spec/gulpfile.js jasmine",
"test-browser-server": "npm run test-browser-build && gulp --gulpfile spec/gulpfile.js jasmine-server",
"test-browser-build": "rm -rf dist && npm run build-ts && cp -r spec/assets dist && npm run bundle",
Expand Down

0 comments on commit 9fc0cf9

Please sign in to comment.