From 985dbdb5111f0f609003e09afad0202bc574b077 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sat, 10 Dec 2022 14:45:57 +0000 Subject: [PATCH] build: remove unnecessary import to `@bazel/jasmine` (#48521) Since we no properly initialize as part of the spec-entrypoint the hacky logic starting Jasmine can be removed. The init file now runs before tests run, but after Jasmine is initialized. Calling `boot` while Jasmine is already initialized results in tests executing in a different context and before other initialization work completes. PR Close #48521 --- tools/testing/node_tests.init.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/testing/node_tests.init.ts b/tools/testing/node_tests.init.ts index 7cc0bf8a09e..8fc6aa04de3 100644 --- a/tools/testing/node_tests.init.ts +++ b/tools/testing/node_tests.init.ts @@ -14,11 +14,6 @@ import 'zone.js/lib/zone-spec/sync-test'; import 'zone.js/lib/testing/async-testing'; import 'zone.js/lib/testing/fake-async'; import 'reflect-metadata/Reflect'; - -// Initialize jasmine with @bazel/jasmine boot() function. This will initialize -// global.jasmine so that it can be patched by zone.js jasmine-patch.js. -(await import('@bazel/jasmine' as any)).boot(); - import 'zone.js/lib/jasmine/jasmine'; (global as any).isNode = true;