1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-22 16:21:41 +03:00
leon/test/unit/server/helpers/loader.spec.js

20 lines
419 B
JavaScript
Raw Normal View History

2019-02-10 15:26:50 +03:00
import loader from '@/helpers/loader'
jest.useFakeTimers()
describe('loader helper', () => {
describe('start()', () => {
test('starts spinner', () => {
expect(loader.start()).toBeObject()
jest.runTimersToTime(60000)
2019-05-21 09:41:22 +03:00
expect(setInterval).toHaveBeenCalledTimes(1)
2019-02-10 15:26:50 +03:00
})
})
describe('stop()', () => {
test('stops spinner', () => {
expect(loader.stop()).toBeObject()
})
})
})