You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { OrderLine } from './OrderLine';
it('check checky', () => {
const instance = new OrderLine(5);
expect(instance.price).toEqual(5);
expect(instance.amount).toEqual(1);
expect(instance.total).toEqual(5); // it returns NaN but should be 5
});
The last test failed with a NaN(because this.amount is undefined) but should return 5 and pass.
Thanks for your work, it's a very inspiring project.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
I'm trying to migrate from babel to swc,(started from swc for JEST)
I have an old codebase that includes MobX5
"mobx": "^5.15.2",
with decorators.To manage decorators I used babel plugins
full babel plugins list
How to reproduce an issue(I created a jest test)
My test
The last test failed with a
NaN
(becausethis.amount
is undefined) but should return 5 and pass.Thanks for your work, it's a very inspiring project.
Input code
No response
Config
Playground link
https://github.com/mhaidamashko/swc-decorators-bug
Expected behavior
I expect to have the same behavior as babel decorators to make it work, maybe we could have the extra option here to manage it.
Actual behavior
No response
Version
1.3.21
Additional context
No response
The text was updated successfully, but these errors were encountered: