Karma和Jasmine vuejs2意外标识符

时间:2018-10-03 15:48:04

标签: javascript unit-testing jasmine karma-jasmine

我有以下测试规范。

'use strict';
 import ContactForm from '../../../js/components/Contact/ContactForm.vue' 
describe('Contact Form', () => {
  it('Should have data property', () => {
    expect(typeof ContactForm.data).toBe('function')
})
});

但是现在出现错误

 {
"message": "An error was thrown in afterAll\nUncaught SyntaxError: Unexpected identifier",
"str": "An error was thrown in afterAll\nUncaught SyntaxError: Unexpected identifier"
}

怎么了?

0 个答案:

没有答案