refactor(ivy): cleanup necessary domino files (#22921)

PR Close #22921
This commit is contained in:
Miško Hevery 2018-03-23 10:54:12 -07:00 committed by Alex Rickabaugh
parent a2330ff2db
commit e7f1af3c54
3 changed files with 1 additions and 22 deletions

View File

@ -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",

View File

@ -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};
}

View File

@ -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); });