Skip to content

Commit

Permalink
Split tests into scenarios and units
Browse files Browse the repository at this point in the history
Refactor tests to split them into scenario and unit tests. Unit tests
should only test a single unit of work any dependency should be mocked
or stubbed. Scenario or integration tests on the other-hand should
verify that different units play well to gather. This refactoring pave
the way for further test improvements.

/Closes mesosphere/marahon#2928
  • Loading branch information
Orlando Hohmeier committed Jan 26, 2016
1 parent 2fd5374 commit e68092b
Show file tree
Hide file tree
Showing 73 changed files with 7,788 additions and 6,442 deletions.
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -84,13 +84,15 @@
"clean": "rm -rf dist release",
"dist": "export GULP_ENV=\"production\" && npm run clean && npm run test && npm run build",
"shrinkwrap": "gulp version-check && npm-shrinkwrap --dev",
"test": "mocha --ui exports --reporter src/test/reporter/reporterSwitch --require babel-core/register --require babel-polyfill --require src/test/environment/jsdom src/test/**/*.test.* src/test/*.test.*",
"test": "mocha --ui exports --reporter src/test/reporter/reporterSwitch --require babel-core/register --require babel-polyfill --require src/test/environment/jsdom src/test/units/**/*.test.* src/test/scenarios/**/*.test.*",
"test:units": "mocha --ui exports --reporter src/test/reporter/reporterSwitch --require babel-core/register --require babel-polyfill --require src/test/environment/jsdom src/test/units/**/*.test.*",
"test:scenarios": "mocha --ui exports --reporter src/test/reporter/reporterSwitch --require babel-core/register --require babel-polyfill --require src/test/environment/jsdom src/test/scenarios/**/*.test.*",
"lint": "eslint src/**/*.js*",
"serve": "export GULP_ENV=\"development\" DISABLE_SOURCE_MAP=false && gulp serve",
"serve-notify": "export NOTIFY=true && npm run serve",
"livereload": "export GULP_ENV=\"development\" DISABLE_SOURCE_MAP=false && gulp livereload",
"cover:prepare": "rm -Rf coverage",
"cover:run": "babel-node ./node_modules/istanbul/lib/cli cover node_modules/mocha/bin/_mocha -- --require src/test/environment/jsdom src/test/*.test.* src/test/**/*.test.*",
"cover:run": "babel-node ./node_modules/istanbul/lib/cli cover node_modules/mocha/bin/_mocha -- --require src/test/environment/jsdom src/test/units/**/*.test.* src/test/scenarios/**/*.test.*",
"cover:report": "npm run cover; istanbul-coveralls",
"cover": "npm run cover:prepare; npm run cover:run"
}
Expand Down

0 comments on commit e68092b

Please sign in to comment.