vue2/test/unit/features/instance/init.spec.ts

13 lines
312 B
TypeScript
Raw Normal View History

import Vue from 'vue'
describe('Initialization', () => {
it('without new', () => {
try { Vue('div') } catch (e) {}
expect('Vue is a constructor and should be called with the `new` keyword').toHaveBeenWarned()
})
it('with new', () => {
expect(new Vue('div') instanceof Vue).toBe(true)
})
})