| load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "nodejs_binary") |
| load("@build_bazel_rules_nodejs//internal/npm_install:npm_umd_bundle.bzl", "npm_umd_bundle") |
| |
| filegroup( |
| name = "goldens", |
| srcs = glob(["golden/**"]), |
| ) |
| |
| jasmine_node_test( |
| name = "test", |
| srcs = ["generate_build_file.spec.js"], |
| data = [ |
| ":check.js", |
| ":goldens", |
| "//internal/npm_install:generate_build_file", |
| "@npm//jasmine", |
| "@npm//unidiff", |
| "@npm_install_test//:test_files", |
| ], |
| ) |
| |
| nodejs_binary( |
| name = "test.accept", |
| data = [ |
| ":check.js", |
| ":goldens", |
| ":update_golden.js", |
| "@npm//jasmine", |
| "@npm//unidiff", |
| "@npm_install_test//:test_files", |
| ], |
| entry_point = ":update_golden.js", |
| install_source_map_support = False, |
| ) |
| |
| npm_umd_bundle( |
| name = "test-minimist-bundling", |
| package_name = "minimist", |
| entry_point = "@npm//:node_modules/minimist/index.js", |
| package = "@npm//minimist", |
| ) |
| |
| npm_umd_bundle( |
| name = "test-core-util-is-bundling", |
| package_name = "core-util-is", |
| entry_point = "@npm//:node_modules/core-util-is/lib/util.js", |
| package = "@npm//core-util-is", |
| ) |
| |
| jasmine_node_test( |
| name = "browserify_test", |
| srcs = ["browserify.spec.js"], |
| data = [ |
| ":core-util-is.umd.js", |
| ":minimist.umd.js", |
| "//internal/npm_install:browserify-wrapped", |
| "@npm//jasmine", |
| ], |
| ) |