mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-21 15:51:49 +03:00
22 lines
433 B
JavaScript
22 lines
433 B
JavaScript
'use strict'
|
|
|
|
import loader from '@/helpers/loader'
|
|
|
|
jest.useFakeTimers()
|
|
|
|
describe('loader helper', () => {
|
|
describe('start()', () => {
|
|
test('starts spinner', () => {
|
|
expect(loader.start()).toBeObject()
|
|
jest.runTimersToTime(60000)
|
|
expect(setInterval).toHaveBeenCalledTimes(1)
|
|
})
|
|
})
|
|
|
|
describe('stop()', () => {
|
|
test('stops spinner', () => {
|
|
expect(loader.stop()).toBeObject()
|
|
})
|
|
})
|
|
})
|