我正在使用 Jest 来测试我的 Node 应用程序。
我是否可以期望/断言一个值是一个日期对象?
expect(typeof result).toEqual(typeof Date())
是我的尝试,但自然返回[Object]。所以这也会通过 {}。
谢谢!
node.js jestjs
jestjs ×1
node.js ×1