generated from coulomb/repo-seed
The bufferToBase64 function from @binect/js expects Node.js Buffer objects but was receiving browser ArrayBuffer, causing "[object ArrayBuffer]" to be sent instead of valid base64. Use browser-native btoa() instead. Also updates tests to work with @binect/js integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21 lines
478 B
JavaScript
21 lines
478 B
JavaScript
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'jsdom',
|
|
roots: ['<rootDir>/tests'],
|
|
testMatch: ['**/*.test.ts'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx}',
|
|
'!src/**/*.d.ts'
|
|
],
|
|
moduleNameMapper: {
|
|
'^@binect/js$': '<rootDir>/tests/__mocks__/@binect/js.ts'
|
|
},
|
|
globals: {
|
|
'ts-jest': {
|
|
tsconfig: 'tsconfig.test.json'
|
|
}
|
|
}
|
|
};
|