mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
tests: flatten renderer mock to src/nitro-renderer.mock.ts (drop __mocks__/)
The Jest-style __mocks__/ folder added one indirection for a single file. Move the stub to src/nitro-renderer.mock.ts at src/ root next to test-setup.ts, drop the folder, repoint the vitest alias, and update the lone test that imports the helpers directly (useDoorbellState). Same behaviour, one fewer directory.
This commit is contained in:
+3
-3
@@ -8,8 +8,8 @@ import { resolve } from 'path';
|
||||
*
|
||||
* Tests live next to their subject under `src/` (`foo.ts` + `foo.test.ts`).
|
||||
* The renderer SDK is aliased to a hand-written stub at
|
||||
* `src/__mocks__/nitro-renderer.ts` so jsdom doesn't try to evaluate
|
||||
* Pixi + the full message parser/composer registry at import time.
|
||||
* `src/nitro-renderer.mock.ts` so jsdom doesn't try to evaluate Pixi +
|
||||
* the full message parser/composer registry at import time.
|
||||
*/
|
||||
export default defineConfig({
|
||||
test: {
|
||||
@@ -21,7 +21,7 @@ export default defineConfig({
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@nitrots/nitro-renderer': resolve(__dirname, 'src/__mocks__/nitro-renderer.ts'),
|
||||
'@nitrots/nitro-renderer': resolve(__dirname, 'src/nitro-renderer.mock.ts'),
|
||||
'@': resolve(__dirname, 'src')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user