Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hundredark committed Sep 26, 2024
1 parent 26b8067 commit 2b8b0e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
'^ky$': 'ky/distribution', // tell Jest to resolve ky's files from `distribution` folder. This will solve the error "Cannot find module 'ky'"
},
transformIgnorePatterns: [
"/node_modules/(?!node-fetch)/",
'/node_modules/(?!node-fetch)/',
'/node_modules/?!ky/distribution', // tell `ts-jest` to transform all js files in `ky/distribution` folder because all ky's js files are ESM files
],
setupFilesAfterEnv: ['<rootDir>/test/jest.ts'],
Expand Down
6 changes: 5 additions & 1 deletion test/mixin/code.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import Code from '../../src/client/code';
import User from '../../src/client/user';
import keystore from '../keystore';

describe('Tests for codes', () => {
const user = User({ keystore });
const code = Code();
test(
'Test for fetch conversation',
async () => {
const resp = await code.fetch('1c6c5da5-a53d-4fec-8d6b-7657fc27c93e');
const me = await user.profile();
const resp = await code.fetch(me.code_id);
expect(resp.type).toMatch('user');
},
1000 * 100,
Expand Down

0 comments on commit 2b8b0e3

Please sign in to comment.