Skip to content

Commit

Permalink
test(main.spec.js): add main.js test
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Jan 11, 2022
1 parent 48ee0e2 commit aec126c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/integration/specs/main.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Main from '@/main'
import Vue from 'vue'

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

describe('Main', () => {
it('should run main and load app', async (done) => {
let main = Main
await new Promise(resolve => setTimeout(resolve, 2000))
expect(main.vueInstance).not.toBeNull()
expect(main.vueInstance).toBeInstanceOf(Vue)
done()
})
})

0 comments on commit aec126c

Please sign in to comment.