@glidejs/glide
Version:
Glide.js is a dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more
15 lines (10 loc) • 309 B
JavaScript
import { warn } from '../../src/utils/log'
describe('Warn should', () => {
test('log an error to the console with suffix', () => {
let fn = jest.fn()
let msg = 'Message content'
global.console = { error: fn }
warn(msg)
expect(fn).toHaveBeenCalledWith(`[Glide warn]: ${msg}`)
})
})