Skip to content

Commit e53c8ab

Browse files
thePunderWomanAndrewKushnir
authored andcommitted
fix(core): Fix flakey test due to document injection
This fixes the test issues with the transfer state by using the DOCUMENT from src/document.
1 parent cb1163e commit e53c8ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/test/transfer_state_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import {APP_ID as APP_ID_TOKEN, PLATFORM_ID} from '../src/core';
1010
import {TestBed} from '../testing';
1111

12-
import {getDocument} from '../src/render3/interfaces/document';
12+
import {DOCUMENT} from '../src/document';
1313
import {makeStateKey, TransferState} from '../src/transfer_state';
1414

1515
function removeScriptTag(doc: Document, id: string) {
@@ -38,13 +38,13 @@ describe('TransferState', () => {
3838
const DELAYED_KEY = makeStateKey<string>('delayed');
3939

4040
beforeEach(() => {
41-
doc = getDocument();
4241
TestBed.configureTestingModule({
4342
providers: [
4443
{provide: APP_ID_TOKEN, useValue: APP_ID},
4544
{provide: PLATFORM_ID, useValue: 'browser'},
4645
],
4746
});
47+
doc = TestBed.inject(DOCUMENT);
4848
});
4949

5050
afterEach(() => {

0 commit comments

Comments
 (0)