-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: improve alert #375
test: improve alert #375
Conversation
@bestguy I noticed that we are using a prop to the I'm a React fan so I like how this looks like but I'm thinking if we could do this more in a svelte way. |
Great, thank you @DaniAcu ! I'll take a look, that makes sense |
Let me know if the tests looks good or I need to change something. I could continue contributing with this kind of things 😄 |
Thanks, it looks good so far, but I want to be cautious on adding babel changes in case it impacts the published library. It should be fine, but I'll confirm over the weekend. Thank you for the help 👍 |
@bestguy I noticed that the bundle increase 10KB with the babel plugin. I could configure a specific babel config for testing if that work for you 😄 |
Yes that sounds great. Are you sure async was not supported already in tests? |
Mmm pretty sure, it was failing because the |
Hi @DaniAcu , I think this change to babel.config.js might work without additional plugins: module.exports = {
presets: [[
'@babel/preset-env',
{
"targets": {
"node": "current"
}
}
], '@babel/preset-typescript']
}; |
Nice, I will continue adding other config or maybe use NODE_ENV, because we don't want to use node as target for a web component library, it should continue using web as target. Thanks for the suggestion 😊 |
Oh yes true, in that case I think can use the babel env test blocks for this, instead of referencing NODE_ENV in code. |
@bestguy haha yeah! I pushed that at the same time that you mention haha. I have a problem with package-lock.json. Let me take a look |
Now it should be fine 😄 |
If this is fine, I'll continue cleaning other tests and trying to add new ones to have a better quality in our code. |
Thanks @DaniAcu, I'll sync and try this evening. I might have a suggestion on the babel config but let me confirm first 👍 |
Any update? 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, one question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thank you!
Changelog
@babel/plugin-transform-runtime
to be able to useasync
/await
@testing-library/jest-dom/extend-expect
to be able to use the expect extentionsqueryByRole
.