Skip to content

Commit

Permalink
fix: fix e2e ts_library //reference_types_directive:tsconfig_types test
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jun 15, 2019
1 parent 84e008a commit 2c16552
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions e2e/ts_library/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/ts_library/reference_types_directive/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

Expand Down
1 change: 1 addition & 0 deletions e2e/ts_library/reference_types_directive/tsconfig_types.ts
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 2c16552

Please sign in to comment.