testdouble
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "testdouble", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "A minimal test double library for TDD with JavaScript", | ||
@@ -12,3 +12,3 @@ "homepage": "https://github.com/testdouble/testdouble.js", | ||
"main": "index.js", | ||
"browser": "lib/browser.coffee", | ||
"browser": "lib/testdouble.coffee", | ||
"config": { | ||
@@ -20,9 +20,11 @@ "build_file": "dist/testdouble.js", | ||
"start": "testem", | ||
"test": "mocha -u mocha-given -R $npm_package_config_mocha_reporter --compilers coffee:coffee-script --recursive test/node-helper.coffee test/general-helper.coffee test/lib", | ||
"test": "mocha -u mocha-given -R $npm_package_config_mocha_reporter --compilers coffee:coffee-script --recursive test/node-helper.coffee test/lib", | ||
"test:ci": "npm run test && testem ci", | ||
"test:debug": "npm test -- --debug-brk", | ||
"build": "browserify . --extension=.coffee -o $npm_package_config_build_file", | ||
"clean": "rm -rf tmp/ dist/", | ||
"build": "browserify . -s testdouble --extension=.coffee -o $npm_package_config_build_file", | ||
"build:tests": "coffee -o tmp/browser-test-coffee/ test/", | ||
"clean": "rm -rf tmp/ dist/* && git checkout -- dist", | ||
"audit:disc": "npm run build -- --full-paths && discify $npm_package_config_build_file --open", | ||
"preversion": "git pull --rebase && npm run test:ci && mkdir -p dist && npm run build && git add dist && git commit -m \"$npm_package_version browser build\"", | ||
"preversion": "git pull --rebase && npm run test:ci", | ||
"version": "npm run build && git add dist", | ||
"postversion": "git push && git push --tags && npm publish" | ||
@@ -32,3 +34,5 @@ }, | ||
"transform": [ | ||
"coffeeify" | ||
"coffeeify", | ||
"envify", | ||
"unreachable-branch-transform" | ||
] | ||
@@ -45,5 +49,7 @@ }, | ||
"disc": "^1.3.2", | ||
"envify": "^3.4.0", | ||
"mocha": "^2.3.1", | ||
"mocha-given": "^0.1.3", | ||
"testem": "^0.9.4" | ||
"testem": "^0.9.4", | ||
"unreachable-branch-transform": "^0.5.0" | ||
}, | ||
@@ -50,0 +56,0 @@ "keywords": [ |
@@ -11,2 +11,4 @@ # testdouble.js | ||
### Node.js | ||
``` | ||
@@ -16,6 +18,6 @@ npm install testdouble --save-dev | ||
At the moment, the library is only published to npm as a normal CommonJS module. | ||
If you'd like to use this for browser tests, please use Browserify or consider | ||
sending a pull request for [this issue](https://github.com/testdouble/testdouble.js/issues/10) | ||
### Browsers | ||
The most-recent release is persisted in git at `dist/testdouble.js`. You can download it [here](https://raw.githubusercontent.com/testdouble/testdouble.js/master/dist/testdouble.js). The library will set the global `window.testdouble`. | ||
## Create with `create()` | ||
@@ -22,0 +24,0 @@ |
@@ -14,13 +14,24 @@ browserLauncher = process.env['TESTEM_BROWSER'] || 'phantomjs'; | ||
before_tests: "mkdir -p tmp && $(npm bin)/browserify . --extension=.coffee -o tmp/subject.js && $(npm bin)/coffee -o tmp/browser-test-coffee/ test/", | ||
framework: 'mocha+chai', | ||
before_tests: "mkdir -p tmp && npm run build --testdouble:build_file=tmp/subject.js && npm run build:tests", | ||
//might want to add this if you do a lot of file-delete/add churn; faster w/o. | ||
//after_tests: "rm -rf tmp/browser-test-coffee; rm tmp/subject.js", | ||
test_page: ".browser-testem-view.mustache", | ||
src_files: [ | ||
"test/browser-vendor/**/*.js", | ||
serve_files: [ | ||
// subject | ||
"tmp/subject.js", | ||
// vendor helpers | ||
"node_modules/lodash/index.js", | ||
"node_modules/mocha-given/browser/mocha-given.js", | ||
// test helpers | ||
"tmp/browser-test-coffee/general-helper.js", | ||
"tmp/browser-test-coffee/browser-helper.js", | ||
"tmp/browser-test-coffee/general-helper.js", | ||
// tests | ||
"tmp/browser-test-coffee/lib/**/*.js" | ||
], | ||
watch_files: [ | ||
@@ -27,0 +38,0 @@ "lib/**/*", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
247
1
454804
9
28
12053