init.spec.ts 324 B

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