Permalink
Browse files

Move test (#1432)

* feature(test): enable build without test

Git pre-commit hook still prevents submit failing code

* docs(test): updated documentation

Clarified test, build and start:production

* test(selector test generator): change 'test case' to 'true'

This make it easier 'cheat' on the test (double-click to select). Useful when manually testing generator output.

* docs(test): updated documentation

Clarified start:production

* remove erroneous single quote

* test(travis): revert yarn calls to npm

Travis does not directly support yarn

As described at https://blog.travis-ci.com/2016-11-21-travis-ci-now-supports-yarn
Travis looks for yarn.lock and maps npm calls to yarn, if present.
  • Loading branch information...
1 parent 2cecca6 commit 41552174bf03538de4a081abbdc89c0dc73077c6 @gihrig gihrig committed on GitHub Jan 13, 2017
Showing with 19 additions and 10 deletions.
  1. +5 −2 .travis.yml
  2. +3 −2 appveyor.yml
  3. +8 −3 docs/general/commands.md
  4. +1 −1 internals/generators/container/selectors.test.js.hbs
  5. +2 −2 package.json
View
@@ -7,7 +7,10 @@ node_js:
script:
- node ./internals/scripts/generate-templates-for-linting
- - yarn run build
+
+install:
+ - npm run test
+ - npm run build
before_install:
- export CHROME_BIN=chromium-browser
@@ -18,7 +21,7 @@ notifications:
email:
on_failure: change
-after_success: 'yarn run coveralls'
+after_success: 'npm run coveralls'
cache:
yarn: true
View
@@ -25,7 +25,7 @@ install:
- choco install -y googlechrome
# Install the latest stable version of Node
- ps: Install-Product node $env:nodejs_version
- - set PATH=%APPDATA%\npm;%PATH%
+ - set PATH=%APPDATA%\yarn;%PATH%
- yarn
# Disable automatic builds
@@ -36,7 +36,8 @@ test_script:
# Output debugging info
- node --version
- node ./internals/scripts/generate-templates-for-linting
- # run build and run tests
+ # run tests and run build
+ - yarn run test
- yarn run build
# Cache node_modules for faster builds
View
@@ -63,7 +63,11 @@ accessible anywhere! Changes in the application code will be hot-reloaded.
npm run start:production
```
-Starts the production server, building the app for optimal performance: assets are
+ * Runs tests (see `npm test`)
+ * Builds your app (see `npm run build`)
+ * Starts the production server (see `npm run start:prod`)
+
+The app is built for optimal performance: assets are
minified and served gzipped.
### Host and Port
@@ -78,8 +82,9 @@ with `--`. E.g. to make the app visible at `my-local-hostname:5000`, run the fol
npm run build
```
-Preps your app for deployment. Optimizes and minifies all files, piping them to
-a folder called `build`. Upload the contents of `build` to your web server to
+Preps your app for deployment (does not run tests). Optimizes and minifies all files, piping them to the `build` folder.
+
+Upload the contents of `build` to your web server to
see your work live!
## Testing
@@ -5,6 +5,6 @@
describe('makeSelect{{ properCase name }}Domain', () => {
it('Expect to have unit tests specified', () => {
- expect('Test case').toEqual(false);
+ expect(true).toEqual(false);
});
});
View
@@ -20,13 +20,13 @@
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"postinstall": "npm run build:dll",
- "prebuild": "npm run build:clean && npm run test",
+ "prebuild": "npm run build:clean",
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "npm run test:clean && rimraf ./build",
"build:dll": "node ./internals/scripts/dependencies.js",
"start": "cross-env NODE_ENV=development node server",
"start:tunnel": "cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
- "start:production": "npm run build && npm run start:prod",
+ "start:production": "npm run test && npm run build && npm run start:prod",
"start:prod": "cross-env NODE_ENV=production node server",
"presetup": "npm i chalk shelljs",
"setup": "node ./internals/scripts/setup.js",

0 comments on commit 4155217

Please sign in to comment.