本文整理汇总了TypeScript中mockery.deregisterAll函数的典型用法代码示例。如果您正苦于以下问题:TypeScript deregisterAll函数的具体用法?TypeScript deregisterAll怎么用?TypeScript deregisterAll使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deregisterAll函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: destroy
destroy(): void {
unload(this.moduleUnderTestPath);
Object.keys(this.mocks)
.map((dep) => resolvePath(this.basePath, dep))
.map((dep) => unload(dep));
this.sandbox.restore();
mockery.deregisterAll();
mockery.disable();
}
示例2: teardown
teardown(() => {
testUtils.removeUnhandledRejectionListener();
mockery.deregisterAll();
mockery.disable();
});
示例3: afterEach
afterEach(function () {
mockery.deregisterAll();
mockery.disable();
});
示例4: require
name: 'updateNotifier',
'setup'() {
mockery.enable({
warnOnUnregistered: false
});
mockery.registerMock('update-notifier', updateNotifierStub);
updateNotifier = require('intern/dojo/node!./../../src/updateNotifier').default;
},
'beforeEach'() {
notifyStub.reset();
updateNotifierStub.reset();
},
'teardown'() {
mockery.deregisterAll();
mockery.disable();
},
'Should call update-notifier with the passed arguments'() {
updateNotifier(testPkg, testInterval);
assert.isTrue(updateNotifierStub.calledOnce);
assert.isTrue(updateNotifierStub.firstCall.calledWith({
'pkg': testPkg,
'updateCheckInterval': testInterval
}));
},
'Should default interval to zero if none passed'() {
updateNotifier(testPkg);
assert.isTrue(updateNotifierStub.calledOnce);
assert.isTrue(updateNotifierStub.firstCall.calledWith({
'pkg': testPkg,
示例5: afterEach
afterEach(function () {
mockery.deregisterAll();
mockery.resetCache();
});
示例6: afterEach
afterEach(function () {
sandbox.restore();
mockery.deregisterAll();
mockery.disable();
});
示例7: afterEach
afterEach(() => {
mockery.deregisterAll();
});
示例8: after
after(() => {
tl.mkdirP.restore();
mockery.deregisterAll();
mockery.disable();
});
示例9: after
after(() => {
mockery.deregisterAll();
//mockery.disable();
});
示例10: afterEach
afterEach(function () {
process.chdir("../..");
lambdaServer.stop();
mockery.deregisterAll();
mockery.disable();
});