diff --git a/karma-js.conf.js b/karma-js.conf.js index fa90ff44f26e1d..e1f7121e42eeef 100644 --- a/karma-js.conf.js +++ b/karma-js.conf.js @@ -7,9 +7,11 @@ */ const browserProvidersConf = require('./browser-providers.conf'); -const {generateSeed} = require('./tools/jasmine-seed-generator'); const {hostname} = require('os'); +const seed = process.env.JASMINE_RANDOM_SEED || String(Math.random()).slice(-5); +console.info(`Jasmine random seed: ${seed}`); + module.exports = function(config) { const conf = { frameworks: ['jasmine'], @@ -17,7 +19,7 @@ module.exports = function(config) { client: { jasmine: { random: true, - seed: generateSeed('karma-js.conf'), + seed, }, captureConsole: true, }, diff --git a/packages/zone.js/test/karma_test.bzl b/packages/zone.js/test/karma_test.bzl index b4986ff91797f8..915d9d25ac8c16 100644 --- a/packages/zone.js/test/karma_test.bzl +++ b/packages/zone.js/test/karma_test.bzl @@ -99,7 +99,6 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps, configuration_env_vars = ["KARMA_WEB_TEST_MODE"], data = [ "//:browser-providers.conf.js", - "//tools:jasmine-seed-generator.js", ], static_files = [ ":assets/sample.json", diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 6f0fb2f06db893..7646511a1364bf 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -372,7 +372,6 @@ def karma_web_test_suite(name, **kwargs): deps = deps, data = data + [ "//:browser-providers.conf.js", - "//tools:jasmine-seed-generator.js", ], karma = "//tools/saucelabs:karma-saucelabs", tags = tags + [ diff --git a/tools/jasmine-seed-generator.js b/tools/jasmine-seed-generator.js deleted file mode 100644 index 1e42a50f89b7ce..00000000000000 --- a/tools/jasmine-seed-generator.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @license - * Copyright Google LLC 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 - */ - -'use strict'; - -// Generate a "random" seed, suitable to be used for pseudo-randomizing jasmine tests. -module.exports = { - generateSeed: caller => { - const seed = process.env.JASMINE_RANDOM_SEED || String(Math.random()).slice(-5); - // tslint:disable-next-line: no-console - console.log(`[${caller}] Jasmine random seed: ${seed}`); - return seed; - }, -};