Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/unit/about.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { shallowMount } from '@vue/test-utils'
import About from '@/components/Pages/About.vue'
require('./boilerplate.js')

describe('About.vue', () => {
it('renders some text', () => {
Expand Down
18 changes: 18 additions & 0 deletions tests/unit/boilerplate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Necessary boilerplate to prevent errors and warnings with newer versions of jest

// See: https://stackoverflow.com/a/60731669
import Vuetify from 'vuetify'
import Vue from 'vue'
Vue.use(Vuetify)

// See: https://stackoverflow.com/a/59904516

// jest and afterEach defined as globals to keep eslint happy
/* global jest, afterEach */
const assignMock = jest.fn()
delete window.location
window.location = { assign: assignMock }

afterEach(() => {
assignMock.mockClear()
})
Loading