Skip to content

Commit

Permalink
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/common/core.config.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
import { ApplicationModule } from '@angular/core';

export default {
flags: ['cacheModule', 'cacheComponent', 'cacheDirective', 'cacheProvider', 'correctModuleExports'],
neverMockModule: [ApplicationModule, CommonModule],
neverMockProvidedFunction: [
'DomRendererFactory2',
3 changes: 2 additions & 1 deletion lib/common/ng-mocks-universe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { InjectionToken } from '@angular/core';

import config from './core.config';
import { AnyType } from './core.types';

/* istanbul ignore next */
@@ -11,7 +12,7 @@ getGlobal().ngMocksUniverse = getGlobal().ngMocksUniverse || {
cacheDeclarations: new Map(),
cacheProviders: new Map(),
config: new Map(),
flags: new Set<string>(['cacheModule', 'cacheComponent', 'cacheDirective', 'cacheProvider', 'correctModuleExports']),
flags: new Set<string>(config.flags),
global: new Map(),
touches: new Set<AnyType<any> | InjectionToken<any>>(),
};
9 changes: 2 additions & 7 deletions lib/mock-helper/mock-helper.reset.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import config from '../common/core.config';
import ngMocksUniverse from '../common/ng-mocks-universe';

export default (): void => {
@@ -6,12 +7,6 @@ export default (): void => {
ngMocksUniverse.cacheProviders = new Map();
ngMocksUniverse.config = new Map();
ngMocksUniverse.global = new Map();
ngMocksUniverse.flags = new Set([
'cacheModule',
'cacheComponent',
'cacheDirective',
'cacheProvider',
'correctModuleExports',
]);
ngMocksUniverse.flags = new Set(config.flags);
ngMocksUniverse.touches = new Set();
};

0 comments on commit d89bb10

Please sign in to comment.