test(service-worker): run the remaining service-worker tests under bazel (#27386)

PR Close #27386
This commit is contained in:
Igor Minar 2018-11-30 17:57:39 -08:00
parent fba9fa2302
commit 194f1f084f
3 changed files with 179 additions and 142 deletions

View File

@ -0,0 +1,23 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(
["**/*.ts"],
),
deps = [
"//packages/service-worker/config",
],
)
jasmine_node_test(
name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [
":test_lib",
"//packages/service-worker/config",
"//packages/service-worker/config/testing",
"//tools/testing:node",
],
)

View File

@ -9,7 +9,6 @@
import {Generator} from '../src/generator';
import {MockFilesystem} from '../testing/mock';
{
describe('Generator', () => {
it('generates a correct config', done => {
const fs = new MockFilesystem({
@ -155,4 +154,3 @@ import {MockFilesystem} from '../testing/mock';
.catch(err => done.fail(err));
});
});
}

View File

@ -0,0 +1,16 @@
package(default_visibility = ["//visibility:public"])
exports_files(["package.json"])
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
srcs = glob([
"*.ts",
]),
deps = [
"//packages/service-worker/cli",
"//packages/service-worker/config",
],
)