chore: Move individual example tests to apps/typegpu-docs#2291
chore: Move individual example tests to apps/typegpu-docs#2291
apps/typegpu-docs#2291Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (348 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
There was a problem hiding this comment.
Pull request overview
Extracts the shared test utility (extendedIt, webgpuGlobals) into a new typegpu-testing-utility workspace package, and updates all test imports across packages/typegpu and apps/typegpu-docs to use the new package. The individual example tests are also relocated under apps/typegpu-docs/tests/individual-example-tests/.
Changes:
- Created
packages/typegpu-testing-utilityas a new internal workspace package containingextendedItandwebgpuGlobals. - Updated all test files to import
it/testfromtypegpu-testing-utilityinstead of relative paths. - Restructured
apps/typegpu-docsvitest config to support a newindividual-example-testsproject alongside the existing browser tests.
Reviewed changes
Copilot reviewed 108 out of 113 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/typegpu-testing-utility/* | New shared test utility package |
| packages/typegpu/tests/**/*.test.ts | Updated imports to use typegpu-testing-utility |
| apps/typegpu-docs/tests/individual-example-tests/**/*.test.ts | Updated imports and relative paths for relocated tests |
| apps/typegpu-docs/vitest.config.mts | Added individual-example-tests project config |
| packages/typegpu/package.json, apps/typegpu-docs/package.json, pnpm-lock.yaml | Added typegpu-testing-utility dependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/typegpu-testing-utility/src/extendedIt.ts:4
- The import
tgpu from '../../typegpu/src/index.js'uses a fragile relative path to reach into thetypegpupackage's source. Sincetypegpuis already declared as a dependency inpackage.json, this should use the package name instead:import tgpu from 'typegpu'. This would be consistent with howTgpuRootis imported on line 3.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
522aa82 to
367c4f4
Compare
Co-authored-by: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com>
ace50d3 to
ddd33e8
Compare
It makes more sense for example tests to be in the
typegpu-docs, and with vitest projects, that can become a reality 😎