test: Migrate test suite to Bun's native testing framework

- Update test files to use Bun's native test and mocking utilities
- Replace Jest-specific imports and mocking techniques with Bun equivalents
- Refactor test setup to use Bun's mock module and testing conventions
- Add new `test/setup.ts` for global test configuration and mocks
- Improve test reliability and simplify mocking approach
- Update TypeScript configuration to support Bun testing ecosystem
This commit is contained in:
jango-blockchained
2025-02-06 13:02:02 +01:00
parent c83e9a859b
commit db53f27a1a
9 changed files with 312 additions and 277 deletions

View File

@@ -1,5 +1,5 @@
[test]
preload = ["./src/__tests__/setup.ts"]
preload = ["./test/setup.ts"]
coverage = true
coverageThreshold = {
statements = 80,
@@ -7,7 +7,7 @@ coverageThreshold = {
functions = 80,
lines = 80
}
timeout = 30000
timeout = 10000
testMatch = ["**/__tests__/**/*.test.ts"]
testPathIgnorePatterns = ["/node_modules/", "/dist/"]
collectCoverageFrom = [
@@ -47,4 +47,7 @@ reload = true
[performance]
gc = true
optimize = true
optimize = true
[test.env]
NODE_ENV = "test"