Skip to content

Commit 49ae309

Browse files
export existence tests for src/chat/
1 parent 762540e commit 49ae309

7 files changed

Lines changed: 120 additions & 1 deletion

File tree

src/chat/thread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var UI = {
1313
widgets: require('../widgets')
1414
}
1515

16-
const utils = require('./utils')
16+
const utils = require('../utils')
1717

1818
// var buttonStyle = 'font-size: 100%; margin: 0.8em; padding:0.5em; background-color: white;'
1919

test/unit/chat/bookmarks.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { findBookmarkDocument, toggleBookmark, renderBookmarksButton } from '../../../src/chat/bookmarks'
2+
3+
describe('findBookmarkDocument', () => {
4+
it('exists', () => {
5+
expect(findBookmarkDocument).toBeInstanceOf(Function)
6+
})
7+
})
8+
9+
describe('toggleBookmark', () => {
10+
it('exists', () => {
11+
expect(toggleBookmark).toBeInstanceOf(Function)
12+
})
13+
})
14+
15+
describe('renderBookmarksButton', () => {
16+
it('exists', () => {
17+
expect(renderBookmarksButton).toBeInstanceOf(Function)
18+
})
19+
})

test/unit/chat/dateFolder.test.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { default as DateFolder } from '../../../src/chat/dateFolder'
2+
3+
describe('DateFolder', () => {
4+
it('exists', () => {
5+
expect(new DateFolder({ dir: () => {} })).toBeInstanceOf(DateFolder)
6+
})
7+
})
8+
9+
describe('DateFolder#leafDocumentFromDate', () => {
10+
it('exists', () => {
11+
expect(new DateFolder({ dir: () => {} }).leafDocumentFromDate).toBeInstanceOf(Function)
12+
})
13+
})
14+
15+
describe('DateFolder#dateFromLeafDocument', () => {
16+
it('exists', () => {
17+
expect(new DateFolder({ dir: () => {} }).dateFromLeafDocument).toBeInstanceOf(Function)
18+
})
19+
})
20+
21+
describe('DateFolder#loadPrevious', () => {
22+
it('exists', () => {
23+
expect(new DateFolder({ dir: () => {} }).loadPrevious).toBeInstanceOf(Function)
24+
})
25+
})
26+
27+
describe('DateFolder#firstLeaf', () => {
28+
it('exists', () => {
29+
expect(new DateFolder({ dir: () => {} }).firstLeaf).toBeInstanceOf(Function)
30+
})
31+
})

test/unit/chat/infinite.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { infiniteMessageArea } from '../../../src/chat/infinite'
2+
3+
describe('infiniteMessageArea', () => {
4+
it('exists', () => {
5+
expect(infiniteMessageArea).toBeInstanceOf(Function)
6+
})
7+
})

test/unit/chat/message.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import {
2+
elementForImageURI,
3+
creatorAndDate,
4+
creatorAndDateHorizontal,
5+
renderMessage
6+
} from '../../../src/chat/message'
7+
8+
describe('elementForImageURI', () => {
9+
it('exists', () => {
10+
expect(elementForImageURI).toBeInstanceOf(Function)
11+
})
12+
})
13+
14+
describe('creatorAndDate', () => {
15+
it('exists', () => {
16+
expect(creatorAndDate).toBeInstanceOf(Function)
17+
})
18+
})
19+
20+
describe('creatorAndDateHorizontal', () => {
21+
it('exists', () => {
22+
expect(creatorAndDateHorizontal).toBeInstanceOf(Function)
23+
})
24+
})
25+
26+
describe('renderMessage', () => {
27+
it('exists', () => {
28+
expect(renderMessage).toBeInstanceOf(Function)
29+
})
30+
})
31+
32+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {
2+
sentimentStrip,
3+
sentimentStripLinked,
4+
messageToolbar
5+
} from '../../../src/chat/messageTools'
6+
7+
describe('sentimentStrip', () => {
8+
it('exists', () => {
9+
expect(sentimentStrip).toBeInstanceOf(Function)
10+
})
11+
})
12+
13+
describe('sentimentStripLinked', () => {
14+
it('exists', () => {
15+
expect(sentimentStripLinked).toBeInstanceOf(Function)
16+
})
17+
})
18+
19+
describe('messageToolbar', () => {
20+
it('exists', () => {
21+
expect(messageToolbar).toBeInstanceOf(Function)
22+
})
23+
})

test/unit/chat/thread.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { default as Thread } from '../../../src/chat/thread'
2+
3+
describe('Thread', () => {
4+
it('exists', () => {
5+
expect(Thread).toBeInstanceOf(Function)
6+
})
7+
})

0 commit comments

Comments
 (0)