[bazel+js]: Wrap grid-ui tests with bazel #16758
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement, Tests
Description
Add Bazel support for grid-ui Jest tests
Integrate aspect_rules_jest dependency for test execution
Configure Jest test runner with Bazel build system
Update dependencies for Jest CLI and test utilities
Diagram Walkthrough
File Walkthrough
MODULE.bazel
Add aspect_rules_jest Bazel dependencyMODULE.bazel
aspect_rules_jestversion 0.24.3 as a new Bazel dependencypackage.json
Add Jest CLI and reporting dependenciesjavascript/grid-ui/package.json
jest-cliversion ^29.7.0 for command-line test executionjest-junitversion ^16.0.0 for JUnit XML test reportingjest-utilversion ^30.2.0 for Jest utilitiespnpm-lock.yaml
Update dependency lock filepnpm-lock.yaml
jest-util
@jest/schemas, @jest/types versions 30.x)
BUILD.bazel
Configure Jest test target in Bazeljavascript/grid-ui/BUILD.bazel
jest_testrule from@aspect_rules_jest//jest:defs.bzlTEST_DEPSlist with testing libraries (@testing-library/react,@testing-library/jest-dom, ts-jest, jest-environment-jsdom)
jest_testtarget named "test" with Jest configuration, sourcefiles, and dependencies
jest.config.cjs
Update Jest transformIgnorePatterns for Bazeljavascript/grid-ui/jest.config.cjs
transformIgnorePatternsregex to handle Aspect Rules JSnode_modules structure
'node_modules/(?!(pretty-ms|parse-ms)/)'to'node_modules/(?!(\\.aspect_rules_js/.*/)?(pretty-ms|parse-ms)/)'