本文整理汇总了TypeScript中mockery.enable函数的典型用法代码示例。如果您正苦于以下问题:TypeScript enable函数的具体用法?TypeScript enable怎么用?TypeScript enable使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了enable函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: setup
setup(() => {
testUtils.setupUnhandledRejectionListener();
testUtils.registerLocMocks();
mockery.enable({ useCleanCache: true, warnOnReplace: false, warnOnUnregistered: false });
mockery.registerMock('fs', { statSync: () => { }, existsSync: () => false });
});
示例2: setup
setup(() => {
testUtils.setupUnhandledRejectionListener();
mockery.enable({ warnOnReplace: false, useCleanCache: true, warnOnUnregistered: false });
testUtils.registerWin32Mocks();
testUtils.registerLocMocks();
});
示例3: beforeEach
beforeEach(function () {
mockery.enable({useCleanCache: true});
mockery.warnOnUnregistered(false);
mockery.warnOnReplace(false);
mockery.registerMock("../lib/core/global", globalModule);
sandbox = sinon.sandbox.create();
});
示例4: beforeEach
beforeEach(function () {
sandbox = sinon.sandbox.create();
mockery.enable({useCleanCache: true});
mockery.warnOnUnregistered(false);
mockery.registerMock("../core/global", globalModule);
BSTVirtualAlexa = require("../../lib/client/bst-virtual-alexa").BSTVirtualAlexa;
});
示例5: before
before(() => {
mockery.disable(); // needed to ensure that we can mock vsts-task-lib/task
mockery.enable({
useCleanCache: true,
warnOnUnregistered: false
} as mockery.MockeryEnableArgs);
});
示例6: beforeEach
beforeEach(() => {
mockery.enable({
useCleanCache: true,
warnOnReplace: false,
warnOnUnregistered: false
});
});
示例7: beforeEach
beforeEach(function () {
mockery.enable({useCleanCache: true});
mockery.warnOnUnregistered(false);
mockery.warnOnReplace(false);
mockery.registerMock("../client/bst-config", mockConfig);
Global = NodeUtil.requireClean("../../lib/core/global").Global;
});
示例8: setup
setup((done) => {
testUtils.setupUnhandledRejectionListener();
mockery.enable({ warnOnReplace: false, useCleanCache: true, warnOnUnregistered: false });
testUtils.registerWin32Mocks();
testUtils.registerLocMocks();
sourceMaps.processNewSourceMap(GENERATED_PATH, SOURCEMAP_URL).then(done);
});
示例9: setup
setup(() => {
testUtils.setupUnhandledRejectionListener();
// Set up mockery
mockery.enable({ warnOnReplace: false, useCleanCache: true });
mockery.registerAllowables([MODULE_UNDER_TEST, 'url', 'http', 'fs', '../../utils', './logger', '../../logger']);
testUtils.win32Mocks();
});
示例10: before
before (function () {
mockery.enable({
warnOnReplace: false,
warnOnUnregistered: false
});
mockery.registerMock('typedoc-plugin-1', () => {});
mockery.registerMock('typedoc-plugin-2', () => {});
});