Skip to content

Commit bcaac18

Browse files
some more buttons tests
1 parent 27cc441 commit bcaac18

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

test/unit/widgets/buttons.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,59 @@ describe('addStyleSheet', () => {
4040
it('exists', () => {
4141
expect(addStyleSheet).toBeInstanceOf(Function)
4242
})
43+
it('runs', () => {
44+
const dom = {
45+
querySelectorAll: () => [],
46+
createElement: () => {
47+
return {
48+
setAttribute: () => {}
49+
}
50+
},
51+
getElementsByTagName: () => [
52+
{
53+
appendChild: () => {}
54+
}
55+
]
56+
}
57+
const href = ''
58+
expect(addStyleSheet(dom, href)).toEqual(undefined)
59+
})
4360
})
4461

4562
describe('allClassURIs', () => {
4663
it('exists', () => {
4764
expect(allClassURIs).toBeInstanceOf(Function)
4865
})
66+
it('runs', () => {
67+
expect(allClassURIs()).toEqual({})
68+
})
69+
4970
})
5071

5172
describe('askName', () => {
5273
it('exists', () => {
5374
expect(askName).toBeInstanceOf(Function)
5475
})
76+
it.skip('runs', async () => {
77+
const element = {
78+
appendChild: () => {
79+
return element
80+
},
81+
setAttribute: () => {},
82+
select: () => {},
83+
focus: () => {},
84+
addEventListener: () => {}
85+
}
86+
const dom = {
87+
createElement: () => element
88+
}
89+
const kb = {}
90+
const container = element
91+
const predicate = {}
92+
const klass = {}
93+
const noun = {}
94+
expect(await askName(dom, kb, container, predicate, klass, noun)).toEqual({})
95+
})
5596
})
5697

5798
describe('attachmentList', () => {

0 commit comments

Comments
 (0)