@ngxs/store 18.1.1-dev.master-77cf50d → 18.1.1-dev.master-1059bf5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,19 +5,20 @@ import { ɵBrowserDomAdapter as BrowserDomAdapter } from '@angular/platform-brow
|
|
|
5
5
|
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
6
6
|
import { NgxsModule, Store } from '@ngxs/store';
|
|
7
7
|
import { NgxsTestModule } from './helpers/ngxs-test.module';
|
|
8
|
+
import { skipConsoleLogging } from './skip-console-logging';
|
|
8
9
|
export class NgxsTestBed {
|
|
9
10
|
static configureTestingStates(options) {
|
|
10
11
|
this.resetTestBed();
|
|
11
12
|
if (options.before) {
|
|
12
13
|
options.before();
|
|
13
14
|
}
|
|
14
|
-
TestBed.configureTestingModule({
|
|
15
|
+
skipConsoleLogging(() => TestBed.configureTestingModule({
|
|
15
16
|
imports: [
|
|
16
17
|
NgxsTestModule,
|
|
17
18
|
NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),
|
|
18
19
|
...(options.imports || [])
|
|
19
20
|
]
|
|
20
|
-
}).compileComponents();
|
|
21
|
+
}).compileComponents());
|
|
21
22
|
NgxsTestBed.ngxsBootstrap();
|
|
22
23
|
return {
|
|
23
24
|
get store() {
|
|
@@ -45,4 +46,4 @@ export class NgxsTestBed {
|
|
|
45
46
|
document.body.appendChild(root);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4cy5zZXR1cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3N0b3JlL2ludGVybmFscy90ZXN0aW5nL3NyYy9uZ3hzLnNldHVwLnRzIl0sI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R5bmFtaWNUZXN0aW5nTW9kdWxlLCBwbGF0Zm9ybUJyb3dzZXJEeW5hbWljVGVzdGluZygpLCB7XG4gICAgICB0ZWFyZG93bjogeyBkZXN0cm95QWZ0ZXJFYWNoOiB0cnVlIH1cbiAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgc3RhdGljIGNyZWF0ZVJvb3ROb2RlKHNlbGVjdG9yID0gJ2FwcC1yb290Jyk6IHZvaWQge1xuICAgIGNvbnN0IGRvY3VtZW50ID0gVGVzdEJlZC5pbmplY3QoRE9DVU1FTlQpO1xuICAgIGNvbnN0IGFkYXB0ZXIgPSBuZXcgQnJvd3NlckRvbUFkYXB0ZXIoKTtcbiAgICBjb25zdCByb290ID0gYWRhcHRlci5jcmVhdGVFbGVtZW50KHNlbGVjdG9yKTtcbiAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHJvb3QpO1xuICB9XG59XG4iXX0=
|
|
@@ -104,19 +104,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
104
104
|
}]
|
|
105
105
|
}] });
|
|
106
106
|
|
|
107
|
+
function loggedError(message) {
|
|
108
|
+
return ['error', [expect.objectContaining({ message })]];
|
|
109
|
+
}
|
|
110
|
+
function skipConsoleLogging(fn, consoleRecorder = []) {
|
|
111
|
+
const consoleSpies = [
|
|
112
|
+
jest.spyOn(console, 'log').mockImplementation((...args) => {
|
|
113
|
+
consoleRecorder.push(['log', args]);
|
|
114
|
+
}),
|
|
115
|
+
jest.spyOn(console, 'warn').mockImplementation((...args) => {
|
|
116
|
+
consoleRecorder.push(['warn', args]);
|
|
117
|
+
}),
|
|
118
|
+
jest.spyOn(console, 'error').mockImplementation((...args) => {
|
|
119
|
+
consoleRecorder.push(['error', args]);
|
|
120
|
+
}),
|
|
121
|
+
jest.spyOn(console, 'info').mockImplementation((...args) => {
|
|
122
|
+
consoleRecorder.push(['info', args]);
|
|
123
|
+
})
|
|
124
|
+
];
|
|
125
|
+
function restoreSpies() {
|
|
126
|
+
consoleSpies.forEach(spy => spy.mockRestore());
|
|
127
|
+
}
|
|
128
|
+
let restoreSpyAsync = false;
|
|
129
|
+
try {
|
|
130
|
+
const returnValue = fn();
|
|
131
|
+
if (returnValue instanceof Promise) {
|
|
132
|
+
restoreSpyAsync = true;
|
|
133
|
+
return returnValue.finally(() => restoreSpies());
|
|
134
|
+
}
|
|
135
|
+
return returnValue;
|
|
136
|
+
}
|
|
137
|
+
finally {
|
|
138
|
+
if (!restoreSpyAsync) {
|
|
139
|
+
restoreSpies();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
107
144
|
class NgxsTestBed {
|
|
108
145
|
static configureTestingStates(options) {
|
|
109
146
|
this.resetTestBed();
|
|
110
147
|
if (options.before) {
|
|
111
148
|
options.before();
|
|
112
149
|
}
|
|
113
|
-
TestBed.configureTestingModule({
|
|
150
|
+
skipConsoleLogging(() => TestBed.configureTestingModule({
|
|
114
151
|
imports: [
|
|
115
152
|
NgxsTestModule,
|
|
116
153
|
NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),
|
|
117
154
|
...(options.imports || [])
|
|
118
155
|
]
|
|
119
|
-
}).compileComponents();
|
|
156
|
+
}).compileComponents());
|
|
120
157
|
NgxsTestBed.ngxsBootstrap();
|
|
121
158
|
return {
|
|
122
159
|
get store() {
|
|
@@ -145,43 +182,6 @@ class NgxsTestBed {
|
|
|
145
182
|
}
|
|
146
183
|
}
|
|
147
184
|
|
|
148
|
-
function loggedError(message) {
|
|
149
|
-
return ['error', [expect.objectContaining({ message })]];
|
|
150
|
-
}
|
|
151
|
-
function skipConsoleLogging(fn, consoleRecorder = []) {
|
|
152
|
-
const consoleSpies = [
|
|
153
|
-
jest.spyOn(console, 'log').mockImplementation((...args) => {
|
|
154
|
-
consoleRecorder.push(['log', args]);
|
|
155
|
-
}),
|
|
156
|
-
jest.spyOn(console, 'warn').mockImplementation((...args) => {
|
|
157
|
-
consoleRecorder.push(['warn', args]);
|
|
158
|
-
}),
|
|
159
|
-
jest.spyOn(console, 'error').mockImplementation((...args) => {
|
|
160
|
-
consoleRecorder.push(['error', args]);
|
|
161
|
-
}),
|
|
162
|
-
jest.spyOn(console, 'info').mockImplementation((...args) => {
|
|
163
|
-
consoleRecorder.push(['info', args]);
|
|
164
|
-
})
|
|
165
|
-
];
|
|
166
|
-
function restoreSpies() {
|
|
167
|
-
consoleSpies.forEach(spy => spy.mockRestore());
|
|
168
|
-
}
|
|
169
|
-
let restoreSpyAsync = false;
|
|
170
|
-
try {
|
|
171
|
-
const returnValue = fn();
|
|
172
|
-
if (returnValue instanceof Promise) {
|
|
173
|
-
restoreSpyAsync = true;
|
|
174
|
-
return returnValue.finally(() => restoreSpies());
|
|
175
|
-
}
|
|
176
|
-
return returnValue;
|
|
177
|
-
}
|
|
178
|
-
finally {
|
|
179
|
-
if (!restoreSpyAsync) {
|
|
180
|
-
restoreSpies();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
185
|
/**
|
|
186
186
|
* Generated bundle index. Do not edit.
|
|
187
187
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-store-internals-testing.mjs","sources":["../../../packages/store/internals/testing/src/fresh-platform.ts","../../../packages/store/internals/testing/src/helpers/ngxs-test.component.ts","../../../packages/store/internals/testing/src/helpers/ngxs-test.module.ts","../../../packages/store/internals/testing/src/ngxs.setup.ts","../../../packages/store/internals/testing/src/skip-console-logging.ts","../../../packages/store/internals/testing/src/ngxs-store-internals-testing.ts"],"sourcesContent":["import { TestBed } from '@angular/core/testing';\nimport { DOCUMENT } from '@angular/common';\nimport { ɵgetDOM as getDOM } from '@angular/platform-browser';\nimport { VERSION, destroyPlatform, createPlatform } from '@angular/core';\n\nfunction createRootElement() {\n const document = TestBed.inject(DOCUMENT);\n const root = getDOM().createElement('app-root', document);\n document.body.appendChild(root);\n}\n\nfunction removeRootElement() {\n const root: Element = document.getElementsByTagName('app-root').item(0)!;\n try {\n document.body.removeChild(root);\n } catch {}\n}\n\nfunction destroyPlatformBeforeBootstrappingTheNewOne(freshUrl: string) {\n destroyPlatform();\n resetLocationToUrl(freshUrl);\n createRootElement();\n}\n\n// As we create our custom platform via `bootstrapModule`\n// we have to destroy it after assetions and revert\n// the previous one\nfunction resetPlatformAfterBootstrapping() {\n removeRootElement();\n destroyPlatform();\n const version = +VERSION.major;\n // https://github.com/angular/angular/commit/e250db4f261741b04ee4cbad4dec41a8908a12aa\n if (version < 14) {\n createPlatform(TestBed);\n }\n}\n\nfunction resetLocationToUrl(freshUrl: string) {\n window.history.replaceState({}, 'Test', freshUrl);\n}\n\nexport function freshPlatform(fn: (done?: VoidFunction) => Promise<void>) {\n let resolve: VoidFunction | null = null;\n let reject: ((error: Error) => void) | null = null;\n let whenDoneIsCalledPromise: Promise<void> | null = null;\n\n const hasDoneArgument = fn.length === 1;\n\n if (hasDoneArgument) {\n whenDoneIsCalledPromise = new Promise<void>((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n }\n\n return async function testWithAFreshPlatform() {\n try {\n const freshUrl = '/';\n destroyPlatformBeforeBootstrappingTheNewOne(freshUrl);\n\n if (hasDoneArgument) {\n await fn((error?: Error) => {\n if (error) {\n reject!(error);\n } else {\n resolve!();\n }\n });\n await whenDoneIsCalledPromise!;\n } else {\n await fn();\n }\n } finally {\n resetPlatformAfterBootstrapping();\n }\n };\n}\n","import { AfterViewInit, Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n template: ''\n})\nexport class NgxsTestComponent implements OnInit, AfterViewInit {\n public ngOnInit(): void {}\n public ngAfterViewInit(): void {}\n}\n","import { ApplicationRef, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { NgxsTestComponent } from './ngxs-test.component';\n\n@NgModule({\n imports: [BrowserModule],\n declarations: [NgxsTestComponent]\n})\nexport class NgxsTestModule {\n public static ngDoBootstrap(app: ApplicationRef): void {\n app.bootstrap(NgxsTestComponent);\n }\n}\n","import { ApplicationRef } from '@angular/core';\nimport { TestBed, TestBedStatic } from '@angular/core/testing';\nimport { DOCUMENT } from '@angular/common';\nimport { ɵBrowserDomAdapter as BrowserDomAdapter } from '@angular/platform-browser';\nimport {\n BrowserDynamicTestingModule,\n platformBrowserDynamicTesting\n} from '@angular/platform-browser-dynamic/testing';\nimport { NgxsModule, Store } from '@ngxs/store';\n\nimport { NgxsTestModule } from './helpers/ngxs-test.module';\nimport { NgxsOptionsTesting, NgxsTesting } from './symbol';\n\nexport class NgxsTestBed {\n public static configureTestingStates(options: NgxsOptionsTesting): NgxsTesting {\n this.resetTestBed();\n\n if (options.before) {\n options.before();\n }\n\n TestBed.configureTestingModule({\n imports: [\n NgxsTestModule,\n NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),\n ...(options.imports || [])\n ]\n }).compileComponents();\n\n NgxsTestBed.ngxsBootstrap();\n\n return {\n get store(): Store {\n return TestBed.inject(Store);\n },\n get getTestBed(): TestBedStatic {\n return TestBed;\n }\n };\n }\n\n private static ngxsBootstrap(): void {\n NgxsTestBed.createRootNode();\n NgxsTestModule.ngDoBootstrap(TestBed.inject(ApplicationRef));\n }\n\n private static resetTestBed(): void {\n TestBed.resetTestEnvironment();\n TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {\n teardown: { destroyAfterEach: true }\n });\n }\n\n private static createRootNode(selector = 'app-root'): void {\n const document = TestBed.inject(DOCUMENT);\n const adapter = new BrowserDomAdapter();\n const root = adapter.createElement(selector);\n document.body.appendChild(root);\n }\n}\n","export type ConsoleRecord = [string, any[]];\nexport type ConsoleRecorder = ConsoleRecord[];\n\nexport function loggedError(message: string): ConsoleRecord {\n return ['error', [expect.objectContaining({ message })]];\n}\n\nexport function skipConsoleLogging<T extends (...args: any[]) => any>(\n fn: T,\n consoleRecorder: ConsoleRecorder = []\n): ReturnType<T> {\n const consoleSpies = [\n jest.spyOn(console, 'log').mockImplementation((...args) => {\n consoleRecorder.push(['log', args]);\n }),\n jest.spyOn(console, 'warn').mockImplementation((...args) => {\n consoleRecorder.push(['warn', args]);\n }),\n jest.spyOn(console, 'error').mockImplementation((...args) => {\n consoleRecorder.push(['error', args]);\n }),\n jest.spyOn(console, 'info').mockImplementation((...args) => {\n consoleRecorder.push(['info', args]);\n })\n ];\n function restoreSpies() {\n consoleSpies.forEach(spy => spy.mockRestore());\n }\n let restoreSpyAsync = false;\n try {\n const returnValue = fn();\n if (returnValue instanceof Promise) {\n restoreSpyAsync = true;\n return returnValue.finally(() => restoreSpies()) as ReturnType<T>;\n }\n return returnValue;\n } finally {\n if (!restoreSpyAsync) {\n restoreSpies();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDOM","BrowserDomAdapter"],"mappings":";;;;;;;;AAKA,SAAS,iBAAiB,GAAA;IACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAGA,OAAM,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC1D,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,iBAAiB,GAAA;AACxB,IAAA,MAAM,IAAI,GAAY,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC;AACzE,IAAA,IAAI;AACF,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACjC;IAAC,MAAM,GAAE;AACZ,CAAC;AAED,SAAS,2CAA2C,CAAC,QAAgB,EAAA;AACnE,IAAA,eAAe,EAAE,CAAC;IAClB,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC7B,IAAA,iBAAiB,EAAE,CAAC;AACtB,C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D,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACvC,SAAC,CAAC;KACH,CAAC;AACF,IAAA,SAAS,YAAY,GAAA;AACnB,QAAA,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;KAChD;IACD,IAAI,eAAe,GAAG,KAAK,CAAC;AAC5B,IAAA,IAAI;AACF,QAAA,MAAM,WAAW,GAAG,EAAE,EAAE,CAAC;AACzB,QAAA,IAAI,WAAW,YAAY,OAAO,EAAE;YAClC,eAAe,GAAG,IAAI,CAAC;YACvB,OAAO,WAAW,CAAC,OAAO,CAAC,MAAM,YAAY,EAAE,CAAkB,CAAC;SACnE;AACD,QAAA,OAAO,WAAW,CAAC;KACpB;YAAS;QACR,IAAI,CAAC,eAAe,EAAE;AACpB,YAAA,YAAY,EAAE,CAAC;SAChB;KACF;AACH;;ACzCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngxs-store-internals-testing.mjs","sources":["../../../packages/store/internals/testing/src/fresh-platform.ts","../../../packages/store/internals/testing/src/helpers/ngxs-test.component.ts","../../../packages/store/internals/testing/src/helpers/ngxs-test.module.ts","../../../packages/store/internals/testing/src/skip-console-logging.ts","../../../packages/store/internals/testing/src/ngxs.setup.ts","../../../packages/store/internals/testing/src/ngxs-store-internals-testing.ts"],"sourcesContent":["import { TestBed } from '@angular/core/testing';\nimport { DOCUMENT } from '@angular/common';\nimport { ɵgetDOM as getDOM } from '@angular/platform-browser';\nimport { VERSION, destroyPlatform, createPlatform } from '@angular/core';\n\nfunction createRootElement() {\n const document = TestBed.inject(DOCUMENT);\n const root = getDOM().createElement('app-root', document);\n document.body.appendChild(root);\n}\n\nfunction removeRootElement() {\n const root: Element = document.getElementsByTagName('app-root').item(0)!;\n try {\n document.body.removeChild(root);\n } catch {}\n}\n\nfunction destroyPlatformBeforeBootstrappingTheNewOne(freshUrl: string) {\n destroyPlatform();\n resetLocationToUrl(freshUrl);\n createRootElement();\n}\n\n// As we create our custom platform via `bootstrapModule`\n// we have to destroy it after assetions and revert\n// the previous one\nfunction resetPlatformAfterBootstrapping() {\n removeRootElement();\n destroyPlatform();\n const version = +VERSION.major;\n // https://github.com/angular/angular/commit/e250db4f261741b04ee4cbad4dec41a8908a12aa\n if (version < 14) {\n createPlatform(TestBed);\n }\n}\n\nfunction resetLocationToUrl(freshUrl: string) {\n window.history.replaceState({}, 'Test', freshUrl);\n}\n\nexport function freshPlatform(fn: (done?: VoidFunction) => Promise<void>) {\n let resolve: VoidFunction | null = null;\n let reject: ((error: Error) => void) | null = null;\n let whenDoneIsCalledPromise: Promise<void> | null = null;\n\n const hasDoneArgument = fn.length === 1;\n\n if (hasDoneArgument) {\n whenDoneIsCalledPromise = new Promise<void>((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n }\n\n return async function testWithAFreshPlatform() {\n try {\n const freshUrl = '/';\n destroyPlatformBeforeBootstrappingTheNewOne(freshUrl);\n\n if (hasDoneArgument) {\n await fn((error?: Error) => {\n if (error) {\n reject!(error);\n } else {\n resolve!();\n }\n });\n await whenDoneIsCalledPromise!;\n } else {\n await fn();\n }\n } finally {\n resetPlatformAfterBootstrapping();\n }\n };\n}\n","import { AfterViewInit, Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n template: ''\n})\nexport class NgxsTestComponent implements OnInit, AfterViewInit {\n public ngOnInit(): void {}\n public ngAfterViewInit(): void {}\n}\n","import { ApplicationRef, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { NgxsTestComponent } from './ngxs-test.component';\n\n@NgModule({\n imports: [BrowserModule],\n declarations: [NgxsTestComponent]\n})\nexport class NgxsTestModule {\n public static ngDoBootstrap(app: ApplicationRef): void {\n app.bootstrap(NgxsTestComponent);\n }\n}\n","export type ConsoleRecord = [string, any[]];\nexport type ConsoleRecorder = ConsoleRecord[];\n\nexport function loggedError(message: string): ConsoleRecord {\n return ['error', [expect.objectContaining({ message })]];\n}\n\nexport function skipConsoleLogging<T extends (...args: any[]) => any>(\n fn: T,\n consoleRecorder: ConsoleRecorder = []\n): ReturnType<T> {\n const consoleSpies = [\n jest.spyOn(console, 'log').mockImplementation((...args) => {\n consoleRecorder.push(['log', args]);\n }),\n jest.spyOn(console, 'warn').mockImplementation((...args) => {\n consoleRecorder.push(['warn', args]);\n }),\n jest.spyOn(console, 'error').mockImplementation((...args) => {\n consoleRecorder.push(['error', args]);\n }),\n jest.spyOn(console, 'info').mockImplementation((...args) => {\n consoleRecorder.push(['info', args]);\n })\n ];\n function restoreSpies() {\n consoleSpies.forEach(spy => spy.mockRestore());\n }\n let restoreSpyAsync = false;\n try {\n const returnValue = fn();\n if (returnValue instanceof Promise) {\n restoreSpyAsync = true;\n return returnValue.finally(() => restoreSpies()) as ReturnType<T>;\n }\n return returnValue;\n } finally {\n if (!restoreSpyAsync) {\n restoreSpies();\n }\n }\n}\n","import { ApplicationRef } from '@angular/core';\nimport { TestBed, TestBedStatic } from '@angular/core/testing';\nimport { DOCUMENT } from '@angular/common';\nimport { ɵBrowserDomAdapter as BrowserDomAdapter } from '@angular/platform-browser';\nimport {\n BrowserDynamicTestingModule,\n platformBrowserDynamicTesting\n} from '@angular/platform-browser-dynamic/testing';\nimport { NgxsModule, Store } from '@ngxs/store';\n\nimport { NgxsTestModule } from './helpers/ngxs-test.module';\nimport { NgxsOptionsTesting, NgxsTesting } from './symbol';\nimport { skipConsoleLogging } from './skip-console-logging';\n\nexport class NgxsTestBed {\n public static configureTestingStates(options: NgxsOptionsTesting): NgxsTesting {\n this.resetTestBed();\n\n if (options.before) {\n options.before();\n }\n\n skipConsoleLogging(() =>\n TestBed.configureTestingModule({\n imports: [\n NgxsTestModule,\n NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),\n ...(options.imports || [])\n ]\n }).compileComponents()\n );\n\n NgxsTestBed.ngxsBootstrap();\n\n return {\n get store(): Store {\n return TestBed.inject(Store);\n },\n get getTestBed(): TestBedStatic {\n return TestBed;\n }\n };\n }\n\n private static ngxsBootstrap(): void {\n NgxsTestBed.createRootNode();\n NgxsTestModule.ngDoBootstrap(TestBed.inject(ApplicationRef));\n }\n\n private static resetTestBed(): void {\n TestBed.resetTestEnvironment();\n TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {\n teardown: { destroyAfterEach: true }\n });\n }\n\n private static createRootNode(selector = 'app-root'): void {\n const document = TestBed.inject(DOCUMENT);\n const adapter = new BrowserDomAdapter();\n const root = adapter.createElement(selector);\n document.body.appendChild(root);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDOM","BrowserDomAdapter"],"mappings":";;;;;;;;AAKA,SAAS,iBAAiB,GAAA;IACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAGA,OAAM,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC1D,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,iBAAiB,GAAA;AACxB,IAAA,MAAM,IAAI,GAAY,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC;AACzE,IAAA,IAAI;AACF,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACjC;IAAC,MAAM,GAAE;AACZ,CAAC;AAED,SAAS,2CAA2C,CAAC,QAAgB,EAAA;AACnE,IAAA,eAAe,EAAE,CAAC;IAClB,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC7B,IAAA,iBAAiB,EAAE,CAAC;AACtB,CAAC;AAED;AACA;AACA;AACA,SAAS,+BAA+B,GAAA;AACtC,IAAA,iBAAiB,EAAE,CAAC;AACpB,IAAA,eAA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