Skip to content

Commit 25c90f9

Browse files
committed
Add test code
1 parent 0de6892 commit 25c90f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { getCss } from '@devup-ui/wasm'
2+
3+
import devupUICssLoader from '../css-loader'
4+
5+
vi.mock('@devup-ui/wasm')
6+
7+
describe('devupUICssLoader', () => {
8+
it('should invoke callback', () => {
9+
vi.mocked(getCss).mockReturnValue('css')
10+
const callback = vi.fn()
11+
devupUICssLoader.bind({
12+
callback,
13+
} as any)(Buffer.from(''), '')
14+
expect(callback).toBeCalledWith(null, 'css')
15+
})
16+
})

0 commit comments

Comments
 (0)