Skip to content

Commit 5ca0575

Browse files
I think we will need to mock the fetcher for these ones
1 parent 4fc1668 commit 5ca0575

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

test/unit/chat/dateFolder.test.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,62 @@ describe('DateFolder#leafDocumentFromDate', () => {
1010
it('exists', () => {
1111
expect(new DateFolder({ dir: () => {} }).leafDocumentFromDate).toBeInstanceOf(Function)
1212
})
13+
it.skip('runs', () => {
14+
const dateFolder = new DateFolder({ dir: () => {
15+
uri: ''
16+
} });
17+
const result = dateFolder.leafDocumentFromDate({
18+
toISOString: () => ''
19+
})
20+
expect(result).toEqual({})
21+
})
1322
})
1423

1524
describe('DateFolder#dateFromLeafDocument', () => {
1625
it('exists', () => {
1726
expect(new DateFolder({ dir: () => {} }).dateFromLeafDocument).toBeInstanceOf(Function)
1827
})
28+
it.skip('runs', () => {
29+
const dateFolder = new DateFolder({ dir: () => {
30+
uri: ''
31+
} });
32+
const result = dateFolder.dateFromLeafDocument({
33+
toISOString: () => ''
34+
})
35+
expect(result).toEqual({})
36+
})
37+
1938
})
2039

2140
describe('DateFolder#loadPrevious', () => {
2241
it('exists', () => {
2342
expect(new DateFolder({ dir: () => {} }).loadPrevious).toBeInstanceOf(Function)
2443
})
44+
it.skip('runs', async () => {
45+
const dateFolder = new DateFolder({ dir: () => {
46+
uri: ''
47+
} });
48+
const result = await dateFolder.loadPrevious({
49+
toISOString: ''
50+
})
51+
expect(result).toEqual({})
52+
})
53+
2554
})
2655

2756
describe('DateFolder#firstLeaf', () => {
2857
it('exists', () => {
2958
expect(new DateFolder({ dir: () => {} }).firstLeaf).toBeInstanceOf(Function)
3059
})
60+
it.skip('runs', async () => {
61+
const dateFolder = new DateFolder({ dir: () => {
62+
uri: ''
63+
} });
64+
;(window as any).$rdf = {
65+
graph: () => {},
66+
Fetcher: function () {}
67+
}
68+
const result = await dateFolder.firstLeaf()
69+
expect(result).toEqual({})
70+
})
3171
})

0 commit comments

Comments
 (0)