Vue + typescript - TypeError: Object prototype may only be an Object or null: undefined

后端 未结 6 1350
你的背包
你的背包 2020-12-19 07:48

TypeError: Object prototype may only be an Object or null: undefined

I got some error in my project. I\'m using vuejs, typescript and jest.

It\'s just simp

6条回答
  •  抹茶落季
    2020-12-19 08:48

    Not

     it("message is Hello", () => {
        expect(cmp.vm.msg).toEqual('Hello!!');
      });
    

    Should be

    it("message is Hello", () => {
        expect(cmp.msg).toEqual('Hello!!');
      });
    

提交回复
热议问题