Skip to content

Commit

Permalink
fix(@formatjs/swc-plugin-experimental): fix when there is no pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrocat101 committed Mar 21, 2023
1 parent 29ba4b2 commit e225480
Show file tree
Hide file tree
Showing 5 changed files with 1,524 additions and 592 deletions.
28 changes: 16 additions & 12 deletions packages/swc-plugin-experimental/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@aspect_rules_js//npm/private:npm_package.bzl", "npm_package")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:jest.bzl", "jest_test")
load("@aspect_rules_jest//jest:defs.bzl", aspect_jest_test = "jest_test")

npm_link_all_packages(name = "node_modules")

Expand All @@ -25,21 +25,25 @@ npm_package(
visibility = ["//visibility:public"],
)

jest_test(
# NOTE: move this into its own Bazel rule and include common dependencies automatically.
aspect_jest_test(
name = "test_plugin",
srcs = glob(
["tests/**/*.test.ts"],
),
snapshots = glob([
"tests/**/*.snap",
]),
deps = [
config = "//:jest-aspect.config",
data = [
"index.wasm",
"tests/transform.ts",
"//:node_modules/@jest/transform",
"//:node_modules/@swc/core",
"//:node_modules/@swc/jest",
"//:node_modules/@types/jest",
"//:node_modules/@types/node",
] + glob([
"tests/fixtures/**/*",
]),
"//:node_modules/ts-jest",
"//:node_modules/tslib",
"//:tsconfig",
] + glob(
["tests/**/*.test.ts"],
) + glob(
["tests/fixtures/**/*"],
),
snapshots = glob(["tests/__snapshots__/*.snap"])
)
Loading

0 comments on commit e225480

Please sign in to comment.