本文整理匯總了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', () => {});
});