TypeError: _Counter.Counter is not a constructor
来源:2-9 Jest 中的钩子函数

martin123_
2019-08-28
TypeError: _Counter.Counter is not a constructor
1 | import { Counter } from './Counter';
2 |
> 3 | const counter = new Counter();
| ^
4 | test('测试 addOne', () => {
5 | counter.addOne()
6 | expect(counter.number).toBe(1)
报了这种错,不知道为什么,
写回答
1回答
-
martin123_
提问者
2019-08-28
已找到原因,谢谢
00
相似问题