build(bazel): update to @bazel/jasmine 0.27.4 (#29375)

PR Close #29375
This commit is contained in:
Greg Magolan
2019-03-18 09:26:00 -07:00
committed by Matias Niemelä
parent f9b7b6d2f1
commit 603df13b14
3 changed files with 14 additions and 6 deletions

View File

@ -21,7 +21,15 @@ import 'reflect-metadata/Reflect';
// jasmine_node_test under Bazel will check if `jasmineCore.boot(jasmineCore)`
// has been called and re-use the env if it has.
// See https://github.com/bazelbuild/rules_nodejs/pull/539
const jasmineCore: any = require('jasmine-core');
let jasmineCore: any = null;
try {
// Under Bazel we want to use the jasmine-core version that is
// a transive dep of @bazel/typescript. Attempt to require under
// its nested node_modules incase it was not hoisted.
jasmineCore = require('@bazel/jasmine/node_modules/jasmine-core');
} catch (_) {
jasmineCore = require('jasmine-core');
}
jasmineCore.boot(jasmineCore);
import 'zone.js/dist/jasmine-patch.js';