diff --git a/e2e/ts_library/WORKSPACE b/e2e/ts_library/WORKSPACE index 503c271f9a..8fd5c3b05a 100644 --- a/e2e/ts_library/WORKSPACE +++ b/e2e/ts_library/WORKSPACE @@ -26,6 +26,14 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") yarn_install( name = "npm", + manual_build_file_contents = """ +filegroup( + name = "node_modules_filegroup", + srcs = [ + "//node_modules/@types/jasmine:jasmine__files", + "//node_modules/typescript:typescript__files", + ], +)""", package_json = "//:package.json", yarn_lock = "//:yarn.lock", ) diff --git a/e2e/ts_library/reference_types_directive/BUILD.bazel b/e2e/ts_library/reference_types_directive/BUILD.bazel index bf4ceb5fb1..93576b85b6 100644 --- a/e2e/ts_library/reference_types_directive/BUILD.bazel +++ b/e2e/ts_library/reference_types_directive/BUILD.bazel @@ -7,7 +7,7 @@ ts_library( expected_diagnostics = [ "TS2304: Cannot find name 'Hammer'", ], - node_modules = "@npm//:node_modules", + node_modules = "@npm//:node_modules_filegroup", tsconfig = ":tsconfig.json", ) diff --git a/e2e/ts_library/reference_types_directive/tsconfig_types.ts b/e2e/ts_library/reference_types_directive/tsconfig_types.ts index 657fce4f9b..f2ce8aaae6 100644 --- a/e2e/ts_library/reference_types_directive/tsconfig_types.ts +++ b/e2e/ts_library/reference_types_directive/tsconfig_types.ts @@ -1,3 +1,4 @@ +describe('@jasmine/types types are included via tsconfig.json "types"=["jasmine"]', () => {}); // Since "hammerjs" is not included in the types=[] array in // tsconfig, this should result in a compile error: TS2304: Cannot find name 'Hammer' console.log(typeof Hammer);