init.spec.js 302 B

123456789101112
  1. import Vue from 'vue'
  2. describe('Initialization', () => {
  3. it('without new', () => {
  4. try { Vue() } catch (e) {}
  5. expect('Vue is a constructor and should be called with the `new` keyword').toHaveBeenWarned()
  6. })
  7. it('with new', () => {
  8. expect(new Vue() instanceof Vue).toBe(true)
  9. })
  10. })