proxyquire
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -17,19 +17,19 @@ 'use strict' | ||
assert.equal(stats.fooRequires(), 3) | ||
assert.strictEqual(stats.fooRequires(), 3) | ||
assert.equal(foo.bigBar(), 'BAR') | ||
assert.equal(fooCut.bigBar(), 'BARBER') | ||
assert.equal(fooWild.bigBar(), 'BARBAR') | ||
assert.strictEqual(foo.bigBar(), 'BAR') | ||
assert.strictEqual(fooCut.bigBar(), 'BARBER') | ||
assert.strictEqual(fooWild.bigBar(), 'BARBAR') | ||
// non overriden keys call thru by default | ||
assert.equal(foo.bigRab(), 'RAB') | ||
assert.equal(fooCut.bigRab(), 'RAB') | ||
assert.strictEqual(foo.bigRab(), 'RAB') | ||
assert.strictEqual(fooCut.bigRab(), 'RAB') | ||
// non overridden module path untouched | ||
assert.equal(foo.bigExt(file), '.EXT') | ||
assert.equal(fooCut.bigExt(file), '.EXT') | ||
assert.equal(fooWild.bigExt(file), '.EXT') | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.equal(fooCut.bigBas(file), 'TEST.EXT') | ||
assert.equal(fooWild.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), '.EXT') | ||
assert.strictEqual(fooCut.bigExt(file), '.EXT') | ||
assert.strictEqual(fooWild.bigExt(file), '.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(fooCut.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(fooWild.bigBas(file), 'TEST.EXT') | ||
@@ -40,8 +40,8 @@ // overriding keys after require works for both inline and non inline requires | ||
assert.equal(fooCut.bigBar(), 'FRISEUR') | ||
assert.equal(fooCut.bigRab(), 'RABARBER') | ||
assert.strictEqual(fooCut.bigBar(), 'FRISEUR') | ||
assert.strictEqual(fooCut.bigRab(), 'RABARBER') | ||
// autofilling keys on delete only works for inline requires | ||
cutBarStub.bar = undefined | ||
assert.equal(fooCut.bigBar(), 'BAR') | ||
assert.strictEqual(fooCut.bigBar(), 'BAR') | ||
@@ -59,4 +59,4 @@ cutBarStub.rab = undefined | ||
assert.equal(foo.bigExt(file), 'EXTERMINATE, EXTERMINATE THE /SOME/PATH/TEST.EXT') | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'EXTERMINATE, EXTERMINATE THE /SOME/PATH/TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
@@ -71,3 +71,3 @@ // turned off | ||
assert.equal(foo.bigExt(file), 'EXTERMINATE, EXTERMINATE THE /SOME/PATH/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'EXTERMINATE, EXTERMINATE THE /SOME/PATH/TEST.EXT') | ||
assert.throws(foo.bigBas) | ||
@@ -99,3 +99,3 @@ | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
@@ -112,3 +112,3 @@ // turned back on globally | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
@@ -115,0 +115,0 @@ // turned back off per module |
@@ -21,9 +21,9 @@ 'use strict' | ||
*/ | ||
fsStub.readdir = function (dir, cb) { cb(null, [ 'file1', 'file2' ]) } | ||
fsStub.readdir = function (dir, cb) { cb(null, ['file1', 'file2']) } | ||
calledBack = false | ||
foo.filesAllCaps('./somedir', function (err, files) { | ||
assert.equal(err, null) | ||
assert.equal(files[0], 'FILE1') | ||
assert.equal(files[1], 'FILE2') | ||
assert.strictEqual(err, null) | ||
assert.strictEqual(files[0], 'FILE1') | ||
assert.strictEqual(files[1], 'FILE2') | ||
@@ -42,5 +42,5 @@ calledBack = true | ||
foo.filesAllCaps('./somedir', function (err, files) { | ||
assert.equal(err, readdirError) | ||
assert.strictEqual(err, readdirError) | ||
}) | ||
console.log('*** All asserts passed ***') |
@@ -13,3 +13,3 @@ 'use strict' | ||
foo = proxyquire('./foo', {}) | ||
assert.equal(foo.extnameAllCaps('file.txt'), '.TXT') | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), '.TXT') | ||
@@ -22,7 +22,7 @@ // override path.extname | ||
// path.extname now behaves as we told it to | ||
assert.equal(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT') | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT') | ||
// path.basename on the other hand still functions as before | ||
assert.equal(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT') | ||
assert.strictEqual(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT') | ||
console.log('*** All asserts passed ***') |
@@ -12,4 +12,4 @@ 'use strict' | ||
// when not overridden, path.extname behaves normally | ||
var foo = proxyquire('./foo', { 'path': pathStub }) | ||
assert.equal(foo.extnameAllCaps('file.txt'), '.TXT') | ||
var foo = proxyquire('./foo', { path: pathStub }) | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), '.TXT') | ||
@@ -20,7 +20,7 @@ // override path.extname | ||
// path.extname now behaves as we told it to | ||
assert.equal(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT') | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT') | ||
// path.basename and all other path module methods still function as before | ||
assert.equal(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT') | ||
assert.strictEqual(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT') | ||
console.log('*** All asserts passed ***') |
@@ -33,3 +33,3 @@ 'use strict' | ||
it('extnameAllCaps returns ".MARKDOWN"', function () { | ||
assert.equal(foo.extnameAllCaps(file), '.MARKDOWN') | ||
assert.strictEqual(foo.extnameAllCaps(file), '.MARKDOWN') | ||
}) | ||
@@ -46,3 +46,3 @@ }) | ||
readdirStub.withArgs('../simple').yields(null, [ 'file1', 'file2' ]) | ||
readdirStub.withArgs('../simple').yields(null, ['file1', 'file2']) | ||
}) | ||
@@ -56,5 +56,5 @@ | ||
foo.filesAllCaps('../simple', function (err, files) { | ||
assert.equal(err, null) | ||
assert.equal(files[0], 'FILE1') | ||
assert.equal(files[1], 'FILE2') | ||
assert.strictEqual(err, null) | ||
assert.strictEqual(files[0], 'FILE1') | ||
assert.strictEqual(files[1], 'FILE2') | ||
done() | ||
@@ -83,4 +83,4 @@ }) | ||
foo.filesAllCaps('../simple', function (err, files) { | ||
assert.equal(err, readdirError) | ||
assert.equal(files, null) | ||
assert.strictEqual(err, readdirError) | ||
assert.strictEqual(files, null) | ||
done() | ||
@@ -108,3 +108,3 @@ }) | ||
assert(fs.readdir.calledOnce) | ||
assert.equal(fs.readdir.getCall(0).args[0], '../simple') | ||
assert.strictEqual(fs.readdir.getCall(0).args[0], '../simple') | ||
done() | ||
@@ -111,0 +111,0 @@ }) |
{ | ||
"name": "proxyquire", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Proxies nodejs require in order to allow overriding dependencies during testing.", | ||
@@ -29,10 +29,10 @@ "main": "index.js", | ||
"native-hello-world": "^1.0.0", | ||
"should": "~13.2", | ||
"sinon": "~6.1", | ||
"standard": "^11.0.0" | ||
"should": "^13.2.3", | ||
"sinon": "^7.3.2", | ||
"standard": "^13.0.1" | ||
}, | ||
"dependencies": { | ||
"fill-keys": "^1.0.2", | ||
"module-not-found-error": "^1.0.0", | ||
"resolve": "~1.8.1" | ||
"module-not-found-error": "^1.0.1", | ||
"resolve": "^1.11.1" | ||
}, | ||
@@ -39,0 +39,0 @@ "standard": { |
@@ -47,3 +47,3 @@ # proxyquire [![Build Status](https://secure.travis-ci.org/thlorenz/proxyquire.svg?branch=master)](http://travis-ci.org/thlorenz/proxyquire) | ||
var foo = proxyquire('./foo', { 'path': pathStub }); | ||
assert.equal(foo.extnameAllCaps('file.txt'), '.TXT'); | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), '.TXT'); | ||
@@ -54,6 +54,6 @@ // override path.extname | ||
// path.extname now behaves as we told it to | ||
assert.equal(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT'); | ||
assert.strictEqual(foo.extnameAllCaps('file.txt'), 'EXTERMINATE, EXTERMINATE THE FILE.TXT'); | ||
// path.basename and all other path module methods still function as before | ||
assert.equal(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT'); | ||
assert.strictEqual(foo.basenameAllCaps('/a/b/file.txt'), 'FILE.TXT'); | ||
``` | ||
@@ -63,2 +63,4 @@ | ||
**get.js:** | ||
```js | ||
@@ -73,8 +75,12 @@ var get = require('simple-get'); | ||
**get.test.js:** | ||
```js | ||
var proxyquire = require('proxyquire'); | ||
var proxyquire = require('proxyquire').noCallThru(); | ||
var assert = require('assert'); | ||
var fetch = proxyquire('./get', { | ||
'simple-get': function (url, callback) { | ||
process.nextTick(function () { | ||
callback(null, fakeResponse) | ||
callback(null, { statusCode: 200 }) | ||
}) | ||
@@ -249,7 +255,7 @@ } | ||
// foo1, foo2 and foo3 are different instances of the same module | ||
assert.notEqual(foo1, foo2); | ||
assert.notEqual(foo1, foo3); | ||
assert.notStrictEqual(foo1, foo2); | ||
assert.notStrictEqual(foo1, foo3); | ||
``` | ||
`require.preserveCache` allows you to restore the behavior to match nodejs's `require` again. | ||
`proxyquire.preserveCache` allows you to restore the behavior to match nodejs's `require` again. | ||
@@ -264,4 +270,4 @@ ```js | ||
// foo1, foo2 and foo3 are the same instance | ||
assert.equal(foo1, foo2); | ||
assert.equal(foo1, foo3); | ||
assert.strictEqual(foo1, foo2); | ||
assert.strictEqual(foo1, foo3); | ||
``` | ||
@@ -268,0 +274,0 @@ |
@@ -20,3 +20,3 @@ 'use strict' | ||
assert.equal(typeof proxiedFoo, 'object') | ||
assert.strictEqual(typeof proxiedFoo, 'object') | ||
assert.notStrictEqual(realFoo, proxiedFoo) | ||
@@ -28,3 +28,3 @@ }) | ||
assert.equal(typeof proxiedFoo, 'object') | ||
assert.strictEqual(typeof proxiedFoo, 'object') | ||
assert.notStrictEqual(realFoo, proxiedFoo) | ||
@@ -36,3 +36,3 @@ }) | ||
assert.equal(typeof proxiedFoo, 'object') | ||
assert.strictEqual(typeof proxiedFoo, 'object') | ||
assert.notStrictEqual(realFoo, proxiedFoo) | ||
@@ -39,0 +39,0 @@ }) |
@@ -12,7 +12,7 @@ 'use strict' | ||
var proxyquire = require('..') | ||
proxyquire('./samples/foo', { 'path': { } }) | ||
proxyquire('./samples/foo', { path: { } }) | ||
var foo = require('./samples/foo') | ||
assert.equal('cached', foo.state) | ||
assert.equal(foo, original) | ||
assert.strictEqual('cached', foo.state) | ||
assert.strictEqual(foo, original) | ||
}) | ||
@@ -26,3 +26,3 @@ | ||
assert.equal(original.original, true) | ||
assert.strictEqual(original.original, true) | ||
}) | ||
@@ -34,3 +34,3 @@ }) | ||
var proxyquire = require('..') | ||
assert.equal(proxyquire.preserveCache(), proxyquire) | ||
assert.strictEqual(proxyquire.preserveCache(), proxyquire) | ||
}) | ||
@@ -44,7 +44,7 @@ | ||
proxyquire.preserveCache() | ||
proxyquire.load('./samples/foo', { 'path': { } }) | ||
proxyquire.load('./samples/foo', { path: { } }) | ||
var foo = require('./samples/foo') | ||
assert.equal('cached', foo.state) | ||
assert.equal(foo, original) | ||
assert.strictEqual('cached', foo.state) | ||
assert.strictEqual(foo, original) | ||
}) | ||
@@ -57,6 +57,6 @@ | ||
proxyquire.preserveCache() | ||
proxyquire.load('./samples/foo-singleton', { 'path': { } }).getInstance() | ||
proxyquire.load('./samples/foo-singleton', { path: { } }).getInstance() | ||
var fooSingleton = require('./samples/foo-singleton').getInstance() | ||
assert.equal(fooSingleton, original) | ||
assert.strictEqual(fooSingleton, original) | ||
}) | ||
@@ -68,3 +68,3 @@ }) | ||
var proxyquire = require('..') | ||
assert.equal(proxyquire.noPreserveCache(), proxyquire) | ||
assert.strictEqual(proxyquire.noPreserveCache(), proxyquire) | ||
}) | ||
@@ -77,13 +77,13 @@ | ||
var proxyquire = require('..') | ||
proxyquire.load('./samples/foo', { 'path': { } }) | ||
proxyquire.load('./samples/foo', { path: { } }) | ||
var cacheFoo = require('./samples/foo') | ||
assert.equal('cached', cacheFoo.state) | ||
assert.equal(cacheFoo, original) | ||
assert.strictEqual('cached', cacheFoo.state) | ||
assert.strictEqual(cacheFoo, original) | ||
proxyquire.noPreserveCache() | ||
proxyquire.load('./samples/foo', { 'path': { } }) | ||
proxyquire.load('./samples/foo', { path: { } }) | ||
var foo = require('./samples/foo') | ||
assert.equal('', foo.state) | ||
assert.notEqual(foo, original) | ||
assert.strictEqual('', foo.state) | ||
assert.notStrictEqual(foo, original) | ||
}) | ||
@@ -94,4 +94,4 @@ | ||
proxyquire.load('./samples/foo', { 'path': { } }) | ||
assert.equal(undefined, require.cache[require.resolve('./samples/foo')]) | ||
proxyquire.load('./samples/foo', { path: { } }) | ||
assert.strictEqual(undefined, require.cache[require.resolve('./samples/foo')]) | ||
}) | ||
@@ -107,11 +107,11 @@ | ||
assert.equal(foo.bar.f.g(), 'a') | ||
assert.equal(foo.bar.h(), 'a') | ||
assert.strictEqual(foo.bar.f.g(), 'a') | ||
assert.strictEqual(foo.bar.h(), 'a') | ||
foo = proxyquire.load('./samples/cache/foo', { './bar': {} }) | ||
assert.equal(foo.bar.h(), 'h') | ||
assert.equal(foo.bar.f.g(), 'g') | ||
assert.strictEqual(foo.bar.h(), 'h') | ||
assert.strictEqual(foo.bar.f.g(), 'g') | ||
assert.equal(undefined, require.cache[require.resolve('./samples/cache/foo')]) | ||
assert.equal(undefined, require.cache[require.resolve('./samples/cache/bar')]) | ||
assert.strictEqual(undefined, require.cache[require.resolve('./samples/cache/foo')]) | ||
assert.strictEqual(undefined, require.cache[require.resolve('./samples/cache/bar')]) | ||
}) | ||
@@ -118,0 +118,0 @@ |
@@ -21,4 +21,4 @@ 'use strict' | ||
assert.equal(realFoo(), false) | ||
assert.equal(proxiedFoo(), true) | ||
assert.strictEqual(realFoo(), false) | ||
assert.strictEqual(proxiedFoo(), true) | ||
}) | ||
@@ -38,4 +38,4 @@ | ||
assert.equal(realFoo(), false) | ||
assert.equal(proxiedFoo(), true) | ||
assert.strictEqual(realFoo(), false) | ||
assert.strictEqual(proxiedFoo(), true) | ||
}) | ||
@@ -45,3 +45,3 @@ | ||
var stubs = { | ||
'foo': { | ||
foo: { | ||
'@global': true | ||
@@ -68,4 +68,4 @@ } | ||
assert.equal(realFoo(), false) | ||
assert.equal(proxiedFoo(), false) | ||
assert.strictEqual(realFoo(), false) | ||
assert.strictEqual(proxiedFoo(), false) | ||
}) | ||
@@ -84,5 +84,5 @@ | ||
assert.equal(realFoo(), false) | ||
assert.equal(proxiedFoo(), false) | ||
assert.strictEqual(realFoo(), false) | ||
assert.strictEqual(proxiedFoo(), false) | ||
}) | ||
}) |
@@ -20,7 +20,7 @@ /* jshint asi:true */ | ||
it('foo1.bigBar() == "BAR1"', function () { | ||
assert.equal(foo1.bigBar(), 'BAR1') | ||
assert.strictEqual(foo1.bigBar(), 'BAR1') | ||
}) | ||
it('foo2.bigBar() == "BAR2"', function () { | ||
assert.equal(foo2.bigBar(), 'BAR2') | ||
assert.strictEqual(foo2.bigBar(), 'BAR2') | ||
}) | ||
@@ -34,7 +34,7 @@ | ||
it('foo1.bigBar() == "BARONE"', function () { | ||
assert.equal(foo1.bigBar(), 'BARONE') | ||
assert.strictEqual(foo1.bigBar(), 'BARONE') | ||
}) | ||
it('foo2.bigBar() == "BAR2"', function () { | ||
assert.equal(foo2.bigBar(), 'BAR2') | ||
assert.strictEqual(foo2.bigBar(), 'BAR2') | ||
}) | ||
@@ -41,0 +41,0 @@ }) |
@@ -17,7 +17,7 @@ 'use strict' | ||
stats.reset() | ||
foo = proxyquire('./samples/foo', {'./boof': boofber}) | ||
foo = proxyquire('./samples/foo', { './boof': boofber }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -27,3 +27,3 @@ | ||
it('foo.boof == boofber', function () { | ||
assert.equal(foo.boof, boofber) | ||
assert.strictEqual(foo.boof, boofber) | ||
}) | ||
@@ -36,7 +36,7 @@ }) | ||
stats.reset() | ||
foo = proxyquire('./samples/foo', {'./foonum': foonumber}) | ||
foo = proxyquire('./samples/foo', { './foonum': foonumber }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -46,3 +46,3 @@ | ||
it('foo.foonum == foonumber', function () { | ||
assert.equal(foo.foonum, foonumber) | ||
assert.strictEqual(foo.foonum, foonumber) | ||
}) | ||
@@ -55,7 +55,7 @@ }) | ||
stats.reset() | ||
foo = proxyquire('./samples/foo', {'./foobool': fooboolber}) | ||
foo = proxyquire('./samples/foo', { './foobool': fooboolber }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -65,3 +65,3 @@ | ||
it('foo.foobool == fooboolber', function () { | ||
assert.equal(foo.foobool, fooboolber) | ||
assert.strictEqual(foo.foobool, fooboolber) | ||
}) | ||
@@ -74,7 +74,7 @@ }) | ||
stats.reset() | ||
foo = proxyquire('./samples/foo', {'./fooarray': fooarray}) | ||
foo = proxyquire('./samples/foo', { './fooarray': fooarray }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -84,3 +84,3 @@ | ||
it('foo.fooarray is fooarray', function () { | ||
assert.deepEqual(foo.fooarray, ['x', 'y', 'z']) | ||
assert.deepStrictEqual(foo.fooarray, ['x', 'y', 'z']) | ||
}) | ||
@@ -93,7 +93,7 @@ }) | ||
stats.reset() | ||
foo = proxyquire('./samples/foo', {'./fooarray': []}) | ||
foo = proxyquire('./samples/foo', { './fooarray': [] }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -103,3 +103,3 @@ | ||
it('foo.fooarray is empty', function () { | ||
assert.deepEqual(foo.fooarray, ['a', 'b', 'c']) | ||
assert.deepStrictEqual(foo.fooarray, ['a', 'b', 'c']) | ||
}) | ||
@@ -113,8 +113,8 @@ }) | ||
var empty = [] | ||
Object.defineProperty(empty, '@noCallThru', {value: true}) | ||
foo = proxyquire('./samples/foo', {'./fooarray': empty}) | ||
Object.defineProperty(empty, '@noCallThru', { value: true }) | ||
foo = proxyquire('./samples/foo', { './fooarray': empty }) | ||
}) | ||
it('foo is required 1 times', function () { | ||
assert.equal(stats.fooRequires(), 1) | ||
assert.strictEqual(stats.fooRequires(), 1) | ||
}) | ||
@@ -124,3 +124,3 @@ | ||
it('foo.fooarray is empty', function () { | ||
assert.deepEqual(foo.fooarray, []) | ||
assert.deepStrictEqual(foo.fooarray, []) | ||
}) | ||
@@ -127,0 +127,0 @@ }) |
@@ -23,3 +23,3 @@ 'use strict' | ||
}) | ||
assert.equal(foo.config, 'bar\'s config') | ||
assert.strictEqual(foo.config, 'bar\'s config') | ||
}) | ||
@@ -34,5 +34,5 @@ }) | ||
}) | ||
assert.equal(foo.config, 'bar\'s config') | ||
assert.strictEqual(foo.config, 'bar\'s config') | ||
proxyquire.callThru() | ||
}) | ||
}) |
@@ -9,5 +9,5 @@ 'use strict' | ||
it('should return the correct result', function () { | ||
var result = proxyquire('./samples/relative-paths/a/index.js', {'./util': {c: 'c'}}) | ||
result.should.eql({a: 'a', c: 'c'}) | ||
var result = proxyquire('./samples/relative-paths/a/index.js', { './util': { c: 'c' } }) | ||
result.should.eql({ a: 'a', c: 'c' }) | ||
}) | ||
}) |
@@ -20,4 +20,4 @@ 'use strict' | ||
var foo = proxyquire(fooPath, { crypto: null }) | ||
assert.equal(foo.bigCrypto(), 'caught') | ||
assert.strictEqual(foo.bigCrypto(), 'caught') | ||
}) | ||
}) |
@@ -25,8 +25,8 @@ 'use strict' | ||
it('does not stub baz in bar', function () { | ||
assert.equal(foo.bar.baz.testexport, 'test') | ||
assert.strictEqual(foo.bar.baz.testexport, 'test') | ||
}) | ||
it('does not affect a normal baz import', function () { | ||
assert.equal(baz.testexport, 'test') | ||
assert.strictEqual(baz.testexport, 'test') | ||
}) | ||
}) |
@@ -22,3 +22,3 @@ /* jshint asi:true */ | ||
it('foo is required 2 times', function () { | ||
assert.equal(stats.fooRequires(), 2) | ||
assert.strictEqual(stats.fooRequires(), 2) | ||
}) | ||
@@ -28,3 +28,3 @@ | ||
it('foo.bigBar() == "BAR"', function () { | ||
assert.equal(foo.bigBar(), 'BAR') | ||
assert.strictEqual(foo.bigBar(), 'BAR') | ||
}) | ||
@@ -35,11 +35,11 @@ }) | ||
it('foober.bigBar() == "BARBER"', function () { | ||
assert.equal(foober.bigBar(), 'BARBER') | ||
assert.strictEqual(foober.bigBar(), 'BARBER') | ||
}) | ||
it('foober.bigExt("/folder/test.ext") == ".EXT"', function () { | ||
assert.equal(foober.bigExt(file), '.EXT') | ||
assert.strictEqual(foober.bigExt(file), '.EXT') | ||
}) | ||
it('foober.bigBas("/folder/test.ext") == "TEST.EXT"', function () { | ||
assert.equal(foober.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foober.bigBas(file), 'TEST.EXT') | ||
}) | ||
@@ -55,7 +55,7 @@ }) | ||
it('overrides behavior when module is required inside function call', function () { | ||
assert.equal(foober.bigBar(), 'FRISEUR') | ||
assert.strictEqual(foober.bigBar(), 'FRISEUR') | ||
}) | ||
it('overrides behavior when module is required on top of file', function () { | ||
assert.equal(foober.bigRab(), 'RABARBER') | ||
assert.strictEqual(foober.bigRab(), 'RABARBER') | ||
}) | ||
@@ -70,3 +70,3 @@ | ||
it('reverts to original behavior when module is required inside function call', function () { | ||
assert.equal(foober.bigBar(), 'BAR') | ||
assert.strictEqual(foober.bigBar(), 'BAR') | ||
}) | ||
@@ -93,7 +93,7 @@ | ||
it('foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT"', function () { | ||
assert.equal(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
}) | ||
it('foo.bigBas(file) == "TEST.EXT"', function () { | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
}) | ||
@@ -112,3 +112,3 @@ }) | ||
it('foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT"', function () { | ||
assert.equal(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
}) | ||
@@ -137,3 +137,3 @@ | ||
it('foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT"', function () { | ||
assert.equal(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
}) | ||
@@ -156,7 +156,7 @@ | ||
it('foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT"', function () { | ||
assert.equal(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
}) | ||
it('foo.bigBas(file) == "TEST.EXT"', function () { | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
}) | ||
@@ -177,7 +177,7 @@ }) | ||
it('foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT"', function () { | ||
assert.equal(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
assert.strictEqual(foo.bigExt(file), 'OVERRIDE /FOLDER/TEST.EXT') | ||
}) | ||
it('foo.bigBas(file) == "TEST.EXT"', function () { | ||
assert.equal(foo.bigBas(file), 'TEST.EXT') | ||
assert.strictEqual(foo.bigBas(file), 'TEST.EXT') | ||
}) | ||
@@ -184,0 +184,0 @@ }) |
var bar = require('./bar') | ||
module.exports = {bar: bar} | ||
module.exports = { bar: bar } |
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
65796
61
495
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedresolve@1.8.1(transitive)
Updatedresolve@^1.11.1