Skip to content

Commit

Permalink
test(about.spec.js): add about test
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Dec 29, 2021
1 parent d8f82d4 commit f74a30c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/specs/about.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import About from '@/fragments/about/About.vue'
import I18nBuilder from '@/i18n/i18n-builder'
import { mount } from '@vue/test-utils'
import AppLoader from '@/app-loader'
import store from '@/store/store'

// Solves the 'RegeneratorRuntime is not defined' issue according to
// https://stackoverflow.com/questions/28976748/regeneratorruntime-is-not-defined
import '@babel/polyfill'

describe('About', () => {
var i18n = I18nBuilder.build()
it('should render about page', async (done) => {
await new AppLoader().fetchApiInitialData()
const wrapper = mount(About, {i18n: i18n, store: store })

expect(wrapper.contains('.about-container')).toBe(true)
expect(wrapper.findComponent(About).exists()).toBe(true)
done()
})
})

0 comments on commit f74a30c

Please sign in to comment.