testdouble
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "testdouble", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A minimal test double library for TDD with JavaScript", | ||
@@ -11,8 +11,24 @@ "homepage": "https://github.com/testdouble/testdouble.js", | ||
}, | ||
"main": "index.js", | ||
"browser": "lib/browser.coffee", | ||
"config": { | ||
"build_file": "dist/testdouble.js", | ||
"mocha_reporter": "spec" | ||
}, | ||
"scripts": { | ||
"test": "mocha --ui mocha-gwt --recursive --require coffee-script --compilers coffee:coffee-script/register 'test/helper.coffee' 'test/'", | ||
"test-debug": "mocha --debug-brk --ui mocha-gwt --recursive --require coffee-script --compilers coffee:coffee-script/register 'test/helper.coffee' 'test/'", | ||
"preversion": "git pull --rebase && npm test", | ||
"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: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/", | ||
"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\"", | ||
"postversion": "git push && git push --tags && npm publish" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"coffeeify" | ||
] | ||
}, | ||
"dependencies": { | ||
@@ -23,7 +39,9 @@ "coffee-script": "^1.10.0", | ||
"devDependencies": { | ||
"browserify": "^11.0.1", | ||
"chai": "^3.2.0", | ||
"grunt": "~0.4.2", | ||
"coffeeify": "^1.1.0", | ||
"disc": "^1.3.2", | ||
"mocha": "^2.3.1", | ||
"mocha-gwt": "^0.2.0", | ||
"testem": "~0.6.15" | ||
"mocha-given": "^0.1.3", | ||
"testem": "^0.9.4" | ||
}, | ||
@@ -30,0 +48,0 @@ "keywords": [ |
@@ -23,3 +23,3 @@ # testdouble.js | ||
``` | ||
``` javascript | ||
var td = require('testdouble'); | ||
@@ -36,3 +36,3 @@ var myTestDouble = td.create(); | ||
``` | ||
``` javascript | ||
var myNamedDouble = td.create("#foo"); | ||
@@ -71,3 +71,3 @@ ``` | ||
``` | ||
``` javascript | ||
var td = require('testdouble'); | ||
@@ -79,3 +79,3 @@ myTestDouble = td.create(); | ||
``` | ||
``` javascript | ||
td.when(myTestDouble()).thenReturn("HEY"); | ||
@@ -88,3 +88,3 @@ | ||
``` | ||
``` javascript | ||
td.when(myTestDouble('a', 5, {foo: 'bar'})).thenReturn("YES"); | ||
@@ -110,3 +110,3 @@ | ||
``` | ||
``` javascript | ||
var td = require('testdouble'); | ||
@@ -119,3 +119,3 @@ var myTestDouble = td.create(); | ||
``` | ||
``` javascript | ||
subject.callTheThingThatShouldBeInvokingMyTestDouble() | ||
@@ -156,3 +156,3 @@ | ||
``` | ||
``` javascript | ||
var td = require('testdouble'); | ||
@@ -171,3 +171,3 @@ var myTestDouble = td.create(); | ||
``` | ||
``` javascript | ||
verify(myTestDouble(td.matchers.isA(Date))) | ||
@@ -235,3 +235,3 @@ ``` | ||
``` | ||
``` javascript | ||
global.td = require('testdouble'); | ||
@@ -242,3 +242,3 @@ ``` | ||
``` | ||
``` javascript | ||
global.double = require('testdouble').create; | ||
@@ -245,0 +245,0 @@ global.when = require('testdouble').when; |
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
875999
32
24013
7
2
2