From e7f1af3c548d63bfbc8e4c06c483c7faaa9a96cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Fri, 23 Mar 2018 10:54:12 -0700 Subject: [PATCH] refactor(ivy): cleanup necessary domino files (#22921) PR Close #22921 --- packages/core/test/bundling/hello_world/BUILD.bazel | 2 +- .../test/bundling/hello_world/domino_typings.d.ts | 12 ------------ .../test/bundling/hello_world/treeshaking_spec.ts | 9 --------- 3 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 packages/core/test/bundling/hello_world/domino_typings.d.ts diff --git a/packages/core/test/bundling/hello_world/BUILD.bazel b/packages/core/test/bundling/hello_world/BUILD.bazel index 68c2a6f35a..f6da85e8b9 100644 --- a/packages/core/test/bundling/hello_world/BUILD.bazel +++ b/packages/core/test/bundling/hello_world/BUILD.bazel @@ -32,7 +32,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", testonly = 1, - srcs = ["domino_typings.d.ts"] + glob(["*_spec.ts"]), + srcs = glob(["*_spec.ts"]), deps = [ "//packages:types", "//packages/core/testing", diff --git a/packages/core/test/bundling/hello_world/domino_typings.d.ts b/packages/core/test/bundling/hello_world/domino_typings.d.ts deleted file mode 100644 index ea774b9c78..0000000000 --- a/packages/core/test/bundling/hello_world/domino_typings.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -declare module 'domino' { - function createWindow(html: string, url: string): Window; - const impl: {Element: any}; -} diff --git a/packages/core/test/bundling/hello_world/treeshaking_spec.ts b/packages/core/test/bundling/hello_world/treeshaking_spec.ts index 7baae2e086..fc7e758315 100644 --- a/packages/core/test/bundling/hello_world/treeshaking_spec.ts +++ b/packages/core/test/bundling/hello_world/treeshaking_spec.ts @@ -15,17 +15,8 @@ const UTF8 = { }; const PACKAGE = 'angular/packages/core/test/bundling/hello_world'; -import * as domino from 'domino'; - describe('treeshaking with uglify', () => { - beforeAll(() => { - // initialize window so that when rxjs is loaded it is loaded and initialized as if it was - // loaded in a browser - // even when the test runs in node - (global as any).window = domino.createWindow('', 'http://localhost'); - }); - let content: string; const contentPath = require.resolve(path.join(PACKAGE, 'bundle.min_debug.js')); beforeAll(() => { content = fs.readFileSync(contentPath, UTF8); });