test(ivy): create todo app in ivy (#22921)

PR Close #22921
This commit is contained in:
Miško Hevery
2018-03-21 17:11:08 -07:00
committed by Alex Rickabaugh
parent 60065935be
commit 55c9fb298f
12 changed files with 1202 additions and 3 deletions

View File

@ -85,6 +85,7 @@ export function ensureDocument(): void {
// we are in node.js.
const window = domino.createWindow('', 'http://localhost');
savedDocument = (global as any).document;
(global as any).window = window;
(global as any).document = window.document;
// Trick to avoid Event patching from
// https://github.com/angular/angular/blob/7cf5e95ac9f0f2648beebf0d5bd9056b79946970/packages/platform-browser/src/dom/events/dom_events.ts#L112-L132
@ -109,6 +110,7 @@ export function ensureDocument(): void {
export function cleanupDocument(): void {
if (savedDocument) {
(global as any).document = savedDocument;
(global as any).window = undefined;
savedDocument = undefined;
}
if (savedNode) {