Skip to content

Commit 17005e6

Browse files
committed
Merge branch 'chat-proof' of https://github.com/solidos/solid-ui into chat-proof
2 parents 282702e + beea007 commit 17005e6

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

test/unit/chat/keys.test.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
import { error, log, trace, warn } from '../../src/debug'
22
import { generatePrivateKey, generatePublicKey, getPublicKey } from '../../../src/chat/keys'
3+
import Fetcher from 'rdflib/lib/fetcher'
34
import { store } from 'solid-logic'
45
const PRIV_KEY = 'a11bc5d2eee6cdb3b37f5473a712cad905ccfb13fb2ccdbf1be0a1ac4fdc7d2a'
56
const PUB_KEY = '023a9da707bee1302f66083c9d95673ff969b41607a66f52686fa774d64ceb87'
67

7-
const mockStore = jest.fn().mockImplementation(() => {
8-
return {
9-
fetcher: {
10-
load: jest.fn()
11-
}
12-
}
13-
})
14-
jest.mock('solid-logic', () => {
15-
return jest.fn().mockImplementation(() => {
16-
return {
17-
store: mockStore
18-
}
19-
})
20-
})
8+
// @ts-ignore
9+
store.fetcher.load = jest.fn().mockImplementation(() => {}) as unknown as Fetcher
2110

2211
describe('generate key pair', () => {
2312
// console.log('alain')

0 commit comments

Comments
 (0)