From af4dd13ffe98b687bd6581e2ef86c3868ec2fb6d Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Thu, 11 Oct 2018 19:46:50 +0100 Subject: [PATCH] Run e2e in travis --- .travis.yml | 4 +++- README.md | 6 ++++-- package.json | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f56c78..5d6e17d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,6 @@ before_install: - npm install -g npm@latest install: - npm install -script: npm run test +script: + - npm run test:unit + - npm run test:e2e diff --git a/README.md b/README.md index 3df59d5..ae9a740 100644 --- a/README.md +++ b/README.md @@ -919,8 +919,10 @@ To setup a local environment: clone this repo, navigate into it's directory in a | Task | Usage | | -------------------- | ------------------------------------------------------------ | | `npm run start` | Fire up local server for development | -| `npm run test` | Run sequence of tests once | -| `npm run test:watch` | Fire up test server and re-test on file change | +| `npm run test:unit` | Run sequence of tests once | +| `npm run test:unit:watch` | Fire up test server and re-test on file change | +| `npm run test:e2e` | Run sequence of e2e tests | +| `npm run test` | Run both unit and e2e tests | | `npm run js:build` | Compile Choices to an uglified JavaScript file | | `npm run css:watch` | Watch SCSS files for changes. On a change, run build process | | `npm run css:build` | Compile, minify and prefix SCSS files to CSS | diff --git a/package.json b/package.json index 4190df2..1665939 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,9 @@ "coverage": "nyc npm run test", "cypress:run": "$(npm bin)/cypress run", "cypress:open": "$(npm bin)/cypress open", - "test": "mocha --require ./config/test.js --compilers js:babel-core/register \"./src/**/**/**/**/*.test.js\"", - "test:watch": "npm run test -- --watch --inspect=5556", - "test:ci": "concurrently --kill-others --prefix-colors yellow,green \"npm run start\" \"npm run cypress\"", + "test:unit": "mocha --require ./config/test.js --compilers js:babel-core/register \"./src/**/**/**/**/*.test.js\" --exit", + "test:unit:watch": "npm run test -- --watch --inspect=5556", + "test:e2e": "concurrently --kill-others --prefix-colors yellow,green \"npm run start\" \"npm run cypress:run\"", "css:watch": "nodemon -e scss -x \"npm run css:build\"", "css:build": "npm run css:sass -s && npm run css:prefix -s && npm run css:min -s", "css:sass": "node-sass --output-style expanded --include-path scss src/styles/base.scss public/assets/styles/base.css && node-sass --output-style expanded --include-path scss src/styles/choices.scss public/assets/styles/choices.css", @@ -22,7 +22,7 @@ "js:build": "concurrently --prefix-colors yellow,green \"webpack --env.minimize --config webpack.config.prod.js\" \"webpack --config webpack.config.prod.js\"", "version": "node version.js --current $npm_package_version --new $npm_config_newVersion", "postversion": "npm run js:build", - "prepush": "npm run lint && npm run test" + "prepush": "npm run lint && npm run test:unit" }, "repository": { "type": "git",