當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript mockery.enable函數代碼示例

本文整理匯總了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 });
    });
開發者ID:snailuncle,項目名稱:vscode-chrome-debug,代碼行數:7,代碼來源:utils.test.ts

示例2: setup

    setup(() => {
        testUtils.setupUnhandledRejectionListener();

        mockery.enable({ warnOnReplace: false, useCleanCache: true, warnOnUnregistered: false });
        testUtils.registerWin32Mocks();
        testUtils.registerLocMocks();
    });
開發者ID:Microsoft,項目名稱:vscode-chrome-debug-core,代碼行數:7,代碼來源:sourceMapUtils.test.ts

示例3: beforeEach

 beforeEach(function () {
     mockery.enable({useCleanCache: true});
     mockery.warnOnUnregistered(false);
     mockery.warnOnReplace(false);
     mockery.registerMock("../lib/core/global", globalModule);
     sandbox = sinon.sandbox.create();
 });
開發者ID:bespoken,項目名稱:bst,代碼行數:7,代碼來源:bst-launch-test.ts

示例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;
 });
開發者ID:bespoken,項目名稱:bst,代碼行數:7,代碼來源:bst-virtual-alexa-test.ts

示例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);
 });
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:7,代碼來源:L0.ts

示例6: beforeEach

 beforeEach(() => {
     mockery.enable({
         useCleanCache: true,
         warnOnReplace: false,
         warnOnUnregistered: false
     });
 });
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:7,代碼來源:nugetL0.ts

示例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;
 });
開發者ID:bespoken,項目名稱:bst,代碼行數:7,代碼來源:global-test.ts

示例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);
 });
開發者ID:Microsoft,項目名稱:vscode-chrome-debug-core,代碼行數:7,代碼來源:sourceMaps.test.ts

示例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();
    });
開發者ID:Event-Horizon,項目名稱:vscode-chrome-debug-core,代碼行數:8,代碼來源:pathUtilities.test.ts

示例10: before

 before (function () {
   mockery.enable({
     warnOnReplace: false,
     warnOnUnregistered: false
   });
   mockery.registerMock('typedoc-plugin-1', () => {});
   mockery.registerMock('typedoc-plugin-2', () => {});
 });
開發者ID:TypeStrong,項目名稱:typedoc,代碼行數:8,代碼來源:plugin-host.ts


注:本文中的mockery.enable函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。