-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(main.spec.js): add main.js test
- Loading branch information
1 parent
48ee0e2
commit aec126c
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
}) | ||
}) |