Open qingfengpai opened 6 years ago
Me neither. So labeled as help wanted
.
@qingfengpai I'm not a user of power-assert but ts-jest may help you. Sample: https://github.com/karak/power-assert-ts-jest
@karak Thanks a lot!!
@karak I expect to report
- Expected
+ Received
- Object {
- "greeting": "Hello",
- }
+ Object {}
assert.equal({}, { greeting: "Hello" })
| |
| Object{greeting:"Hello"}
Object{}
but actual result
- Expected
+ Received
- Object {
- "greeting": "Hello",
- }
+ Object {}
2 |
3 | it("hello", () => {
> 4 | assert.equal({}, { greeting: "Hello" });
| ^
5 | });
6 |
Have you hit on any possible causes of the problem?
I confirmed the version of pure-js gave the same result, and can only say "power-assert" and/or "jest" may have some problems rather than TypeScript.
ADD:
The following command-lines are against your expects as well.
npx jasmine hello.test.js
npx mocha hello.test.js
Is the usage of power-assert correct? I'm not sure.
@karak Thank you, sorry for asking too much. Let me check it out.
i made quick example here. https://gist.github.com/taichi/d000fa1eba03889be58bdf985c922f87
Sorry, I don't use Jest with this package. Someone could help?