Reputation: 7338
I'm working on converting a Node.js library to use Bazel as the build system. So far I have managed to get my TS rules and a basic Jest test execution to work. You can my setup here:
https://github.com/lqc/bazel-examples/tree/master/nodejs_typescript_runnable
So running bazel test //app:test
gives me a proper Junit report in bazel-testlogs
.
Running bazel coverage //app:test
runs the tests, but doesn't produce the LCOV report I would expect.
As far as I could tell, Bazel uses the C8 NPM package to enable the built-in coverage functionality in V8 (I had to add it to my dependencies). At the same time, Jest also has the option to use V8 as a coverage provider.
Should I configure this in Jest? Disable it in Jest? I would be totally fine with configuring this in Jest, but I don't see a way to disable the logic in Bazel around it.
Upvotes: 2
Views: 1079
Reputation: 1
I am sure you have forgotten to commit something , because of closing braces. Check below patch
--- a/nodejs_typescript_runnable/app/tests/some.spec.ts
+++ b/nodejs_typescript_runnable/app/tests/some.spec.ts
@@ -5,5 +5,5 @@ describe("Test suite", () => {
run();
expect(true).toBeTruthy();
- });
+ })});
Just one question, how can we add a single npm package (no further dependencies) to this project
Upvotes: -2