You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build fails when adding a test file with capital letter in the file name. E.g. I added a test file named Other.test.ts under next.js/apps/alpha/pages. The file just contain some dummy test case as below.
// Other.test.ts
import { render, screen } from '@testing-library/react';
import Home from './index';
describe('Other', () => {
it('should fail', () => {
expect(true).toBe(true);
});
});
When run the bazel build on specs, it runs into the following error.
➜ next.js git:(main) ✗ bazel build //apps/alpha/pages:specs
INFO: Analyzed target //apps/alpha/pages:specs (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/xzdev/Sandbox/bazel-examples/next.js/apps/alpha/pages/BUILD.bazel:32:11: output 'apps/alpha/pages/Other.test.js' was not created
ERROR: /Users/xzdev/Sandbox/bazel-examples/next.js/apps/alpha/pages/BUILD.bazel:32:11: output 'apps/alpha/pages/Other.test.d.ts' was not created
ERROR: /Users/xzdev/Sandbox/bazel-examples/next.js/apps/alpha/pages/BUILD.bazel:32:11: Transpiling & type-checking TypeScript project @//apps/alpha/pages:specs [tsc -p tsconfig.json] failed: not all outputs were created or valid
Target //apps/alpha/pages:specs failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.112s, Critical Path: 1.14s
INFO: 2 processes: 1 internal, 1 worker.
FAILED: Build did NOT complete successfully
Version
Development (host) and target OS/architectures:
Output of bazel --version: aspect 5.3.4
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
Add a dummy test file with capital letter. Make sure the file is also added to the BUILD file `specs` src. Run the bazel build on the specs and the error shows.
Any other information?
No response
The text was updated successfully, but these errors were encountered:
xzdev
changed the title
[Bug]: build fail when test name contains capital letter
[Bug]: build fail when test file name contains capital letter
Aug 11, 2023
Could you make a PR against https://github.com/bazelbuild/examples/tree/main/frontend (the next.js example has moved there) that reproduces your issue? That will make it much quicker for us to observe it and see if there's a bug in our example or one of these rulesets.
What happened?
The build fails when adding a test file with capital letter in the file name. E.g. I added a test file named Other.test.ts under next.js/apps/alpha/pages. The file just contain some dummy test case as below.
When run the bazel build on specs, it runs into the following error.
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: aspect 5.3.4Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved: TypeScript
How to reproduce
Any other information?
No response
The text was updated successfully, but these errors were encountered: