**test(tests): improve isolation and enhance test configuration**
- **Test Enhancements**:
- Refactored test setup in `core.test.ts` for better isolation and clarity:
- Added explicit `.clear()` calls to ensure clean state between tests.
- Replaced old vector addition logic with simplified data insertion methods.
- Updated search operations to reflect current functionality and debug-friendly output.
- Introduced the `@vitest-environment jsdom` annotation in `environment.browser.test.ts` for accurate browser environment emulation.
- **Configuration Updates**:
- Enhanced `vitest.config.ts`:
- Introduced custom `reporters` for cleaner and focused test result presentation.
- Expanded console log filtering with additional patterns for reducing noise from TensorFlow.js and setup processes.
- **Purpose**:
- These updates improve test clarity, consistency, and robustness while streamlining the configuration to minimize distractions in test outputs.
This commit is contained in:
parent
3dd47dea5a
commit
d1acd438a3
3 changed files with 61 additions and 18 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/**
|
||||
* Browser Environment Tests
|
||||
* Tests Brainy functionality in browser environment as a consumer would use it
|
||||
* @vitest-environment jsdom
|
||||
*/
|
||||
|
||||
import { describe, it, expect, beforeAll, vi } from 'vitest'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue