Comparing version 0.3.4 to 0.3.5
{ | ||
"name": "empower", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"main": "lib/empower.js", | ||
@@ -14,3 +14,3 @@ "ignore": [ | ||
"dependencies": { | ||
"es5-shim": "~2.2.0" | ||
"es5-shim": "~2.3.0" | ||
}, | ||
@@ -20,5 +20,5 @@ "devDependencies": { | ||
"esprima": "~1.0.4", | ||
"escodegen": "~1.0.1", | ||
"mocha": "~1.16.2", | ||
"requirejs": "~2.1.5", | ||
"escodegen": "~1.3.0", | ||
"mocha": "~1.18.2", | ||
"requirejs": "~2.1.11", | ||
"assert": "Jxck/assert", | ||
@@ -25,0 +25,0 @@ "buster.js": "~0.7.0" |
@@ -55,2 +55,8 @@ module.exports = function(grunt) { | ||
}, | ||
withoutBind: { | ||
src: ['test/test-without-bind.html'], | ||
options: { | ||
run: true | ||
} | ||
}, | ||
amd: { | ||
@@ -91,4 +97,4 @@ src: ['test/test-amd.html'], | ||
grunt.registerTask('unit', ['jshint', 'mochaTest:unit']); | ||
grunt.registerTask('test', ['jshint', 'mochaTest:unit', 'mocha:browser', 'mocha:amd']); | ||
grunt.registerTask('test', ['jshint', 'mochaTest:unit', 'mocha:browser', 'mocha:amd', 'mocha:withoutBind']); | ||
grunt.registerTask('coverage', ['mochaTest:coverage']); | ||
}; |
@@ -63,2 +63,5 @@ /** | ||
} | ||
if (typeof (function(){}.bind) !== 'function') { | ||
throw new Error('empower module depends on method Function#bind that your browser does not support. Please add es5-shim.js to your dependencies.'); | ||
} | ||
if (isEmpowered(assert)) { | ||
@@ -85,5 +88,2 @@ return assert; | ||
function empowerAssertObject (assertObject, formatter, config) { | ||
if (typeof assertObject.ok !== 'function') { | ||
throw new TypeError('empower target object should be respond to \'ok\' method.'); | ||
} | ||
var enhancement = enhance(assertObject, formatter, config), | ||
@@ -90,0 +90,0 @@ target = config.destructive ? assertObject : Object.create(assertObject); |
{ | ||
"name": "empower", | ||
"description": "Power Assert feature enhancer for assert function/object", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"keywords": [ | ||
@@ -32,16 +32,16 @@ "test", | ||
"esprima": "~1.0.4", | ||
"escodegen": "~1.0.1", | ||
"escodegen": "~1.3.0", | ||
"grunt": "~0.4.2", | ||
"grunt-mocha-test": "~0.8.1", | ||
"grunt-contrib-jshint": "~0.8.0", | ||
"grunt-contrib-watch": "~0.5.3", | ||
"grunt-mocha-test": "~0.10.0", | ||
"grunt-contrib-jshint": "~0.9.2", | ||
"grunt-contrib-watch": "~0.6.1", | ||
"grunt-bump": "~0.0.13", | ||
"mocha-lcov-reporter": "~0.0.1", | ||
"blanket": "~1.1.6", | ||
"coveralls": "~2.6.1", | ||
"load-grunt-tasks": "~0.2.1", | ||
"grunt-contrib-connect": "~0.6.0", | ||
"grunt-mocha": "~0.4.7", | ||
"bower": "~1.2.8", | ||
"grunt-bower-requirejs": "~0.8.0", | ||
"coveralls": "~2.10.0", | ||
"load-grunt-tasks": "~0.3.0", | ||
"grunt-contrib-connect": "~0.7.1", | ||
"grunt-mocha": "~0.4.10", | ||
"bower": "~1.3.1", | ||
"grunt-bower-requirejs": "~0.9.2", | ||
"buster-assertions": "~0.10.4" | ||
@@ -48,0 +48,0 @@ }, |
@@ -79,3 +79,2 @@ (function (root, factory) { | ||
argumentTest('cannot pass string', 'hoge'); | ||
argumentTest('should respond to "ok"', {equal: function () { return false; }}, 'empower target object should be respond to \'ok\' method.'); | ||
}); | ||
@@ -82,0 +81,0 @@ |
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
43747
16
935
4