Skip to content

Commit

Permalink
Add coverage support for JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
adierkens committed Dec 8, 2023
1 parent ab8699d commit 39f2968
Show file tree
Hide file tree
Showing 10 changed files with 304 additions and 173 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ js_library(
"//:node_modules/@vitest/coverage-v8",
"//:node_modules/happy-dom",
"//:node_modules/vitest",
"//tools:vitest_coverage_mapper",
],
)

Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ git_override(
# local_path_override(module_name = "rules_player", path = "../rules_player")

bazel_dep(name = "aspect_bazel_lib", version = "1.32.0")
bazel_dep(name = "aspect_rules_js", version = "1.33.1")
bazel_dep(name = "aspect_rules_js", version = "1.34.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "aspect_rules_ts", version = "2.1.0")

####### Node.js version #########
bazel_dep(name = "rules_nodejs", version = "5.8.2")
bazel_dep(name = "rules_nodejs", version = "6.0.2")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "16.14.2")
node.toolchain(node_version = "18.18.0")
#################################

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
Expand Down
2 changes: 1 addition & 1 deletion core/player/src/binding/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe("errors", () => {
expect(() =>
parser.parse("foo.{{nested}}.bar"),
).toThrowErrorMatchingInlineSnapshot(
`"Cannot resolve binding: foo.{{nested}}.bar"`,
`[NestedError: Cannot resolve binding: foo.{{nested}}.bar]`,
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`expression parser > objects- in parser 1`] = `
"character": 2,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand All @@ -29,7 +29,7 @@ exports[`expression parser > objects- in parser 1`] = `
"character": 9,
},
},
"raw": "\\"value\\"",
"raw": ""value"",
"type": "Literal",
"value": "value",
},
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`expression parser > objects- in parser 2`] = `
"character": 2,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand Down Expand Up @@ -108,7 +108,7 @@ exports[`expression parser > objects- in parser 3`] = `
"character": 2,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand Down Expand Up @@ -182,7 +182,7 @@ exports[`expression parser > objects- in parser 4`] = `
"character": 2,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand All @@ -196,7 +196,7 @@ exports[`expression parser > objects- in parser 4`] = `
"character": 9,
},
},
"raw": "\\"value\\"",
"raw": ""value"",
"type": "Literal",
"value": "value",
},
Expand All @@ -212,7 +212,7 @@ exports[`expression parser > objects- in parser 4`] = `
"character": 18,
},
},
"raw": "\\"bar\\"",
"raw": ""bar"",
"type": "Literal",
"value": "bar",
},
Expand All @@ -226,7 +226,7 @@ exports[`expression parser > objects- in parser 4`] = `
"character": 25,
},
},
"raw": "\\"baz\\"",
"raw": ""baz"",
"type": "Literal",
"value": "baz",
},
Expand Down Expand Up @@ -259,7 +259,7 @@ exports[`expression parser > objects- in parser 5`] = `
"character": 2,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand All @@ -273,7 +273,7 @@ exports[`expression parser > objects- in parser 5`] = `
"character": 9,
},
},
"raw": "\\"value\\"",
"raw": ""value"",
"type": "Literal",
"value": "value",
},
Expand All @@ -289,7 +289,7 @@ exports[`expression parser > objects- in parser 5`] = `
"character": 18,
},
},
"raw": "\\"bar\\"",
"raw": ""bar"",
"type": "Literal",
"value": "bar",
},
Expand All @@ -307,7 +307,7 @@ exports[`expression parser > objects- in parser 5`] = `
"character": 27,
},
},
"raw": "\\"baz\\"",
"raw": ""baz"",
"type": "Literal",
"value": "baz",
},
Expand All @@ -321,7 +321,7 @@ exports[`expression parser > objects- in parser 5`] = `
"character": 35,
},
},
"raw": "\\"foo\\"",
"raw": ""foo"",
"type": "Literal",
"value": "foo",
},
Expand Down Expand Up @@ -365,7 +365,7 @@ exports[`expression parser > objects- in parser 6`] = `
"character": 9,
},
},
"raw": "\\"test\\"",
"raw": ""test"",
"type": "Literal",
"value": "test",
},
Expand All @@ -383,7 +383,7 @@ exports[`expression parser > objects- in parser 6`] = `
"character": 18,
},
},
"raw": "\\"key\\"",
"raw": ""key"",
"type": "Literal",
"value": "key",
},
Expand All @@ -397,7 +397,7 @@ exports[`expression parser > objects- in parser 6`] = `
"character": 25,
},
},
"raw": "\\"value\\"",
"raw": ""value"",
"type": "Literal",
"value": "value",
},
Expand Down Expand Up @@ -617,7 +617,7 @@ exports[`the happy stuff 5`] = `
"character": 11,
},
},
"raw": "\\"bar\\"",
"raw": ""bar"",
"type": "Literal",
"value": "bar",
},
Expand All @@ -638,7 +638,7 @@ exports[`the happy stuff 6`] = `
"character": 19,
},
},
"raw": "\\"baz\\"",
"raw": ""baz"",
"type": "Literal",
"value": "baz",
},
Expand All @@ -652,7 +652,7 @@ exports[`the happy stuff 6`] = `
"character": 11,
},
},
"raw": "\\"bar\\"",
"raw": ""bar"",
"type": "Literal",
"value": "bar",
},
Expand Down Expand Up @@ -758,8 +758,8 @@ exports[`the happy stuff 8`] = `
"character": 12,
},
},
"raw": "\\"string
with breaks\\"",
"raw": ""string
with breaks"",
"type": "Literal",
"value": "string
with breaks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`generates the correct AST > parses an exp array 1`] = `
{
"parent": [Circular],
"type": "value",
"value": "{{please}} = \\"work\\"",
"value": "{{please}} = "work"",
},
],
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@types/dlv": "^1.1.4",
"@types/lunr": "^2.3.4",
"@types/mdx-js__react": "^1.5.5",
"@types/node": "^16.18.62",
"@types/node": "^18.18.0",
"@types/parsimmon": "^1.10.0",
"@types/pubsub-js": "^1.8.3",
"@types/react": "^17.0.25",
Expand All @@ -59,7 +59,7 @@
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/coverage-v8": "^1.0.2",
"all-contributors-cli": "^6.20.0",
"arr-flatten": "^1.1.0",
"auto": "^11.0.4",
Expand Down Expand Up @@ -134,7 +134,7 @@
"tsup": "^8.0.1",
"typescript": "5.3.2",
"uuid": "^8.3.2",
"vitest": "^0.34.6"
"vitest": "^1.0.2"
},
"volta": {
"node": "16.14.0"
Expand Down
Loading

0 comments on commit 39f2968

Please sign in to comment.