mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-09-07 21:42:53 +00:00
25 lines
628 B
JavaScript
25 lines
628 B
JavaScript
import Vue from 'vue'
|
|
import { config } from '@vue/test-utils'
|
|
|
|
Vue.config.silent = true
|
|
|
|
// Mock Nuxt components
|
|
config.stubs.nuxt = { template: '<div />' }
|
|
config.stubs['nuxt-link'] = { template: '<a><slot /></a>' }
|
|
config.stubs['no-ssr'] = { template: '<span><slot /></span>' }
|
|
|
|
function fail(message = '') {
|
|
let failMessage = ''
|
|
failMessage += '\n'
|
|
failMessage += 'FAIL FUNCTION TRIGGERED\n'
|
|
failMessage += 'The fail function has been triggered'
|
|
failMessage += message ? ' with message:' : ''
|
|
|
|
expect(message).toEqual(failMessage)
|
|
}
|
|
global.fail = fail
|
|
|
|
process.on('unhandledRejection', (err) => {
|
|
fail(err)
|
|
})
|