Test framework specific warnings
Hey @Shinigami92 , I found a (kind of) easy way to test framework warnings. Could you please have a look on this?
By the way, I'm not a TypeScripter myself, so there is some lint errors that I don't know how to fix.
Also, I don't know how to trigger Angular's specific warnings 😂
I created this from the add-framework-option branch, I didn't noticed that you've merged that branch until I pushed this.
I created this from the add-framework-option branch, I didn't noticed that you've merged that branch until I pushed this.
Yeah it was in this moment ^^
I think you can use git rebase -i main to "fix" this branch
And the git push -f
@SkyaTura Or maybe if this doesn't work well, you need git rebase --onto. But for this you should read documentation, cause I don't know exactly myself how it works.
Merge main into the branch works just fine to "fix" it. Although it keeps a lot a commits 😂
Yeah with the rebase the commits will go away, you should try it
But for testing the logs we should consider using mocks or spys (https://stackoverflow.com/questions/49096093/how-do-i-test-a-jest-console-log) instead of adding runtime code to the project :thinking:
So I now used git rebase --onto main add-framework-option
You may need to re-checkout the branch on your local machine. Maybe use git branch -D add-framework-option-test-warnings to delete it locally, and then re-checkout.
@SkyaTura I'm looking forward to release a v1.14.0 bundling this feature, the new docs and hopefully also now issue-167 if h0merjam will tackle it :smiley:
Do you have time for addressing and working on the console-mock variant in the next time (maybe over upcoming weekend)?
I can work on it in this weekend, for sure.
Hey @Shinigami92 . 👋🏻
I successfully managed to use jest.spyOn to avoid adding runtime code, however, I still don't know what to do to fix those lint errors. 😰
Also, I need someone that actually works with Angular to tell me test cases that throws those warnings, because I wasn't able to reproduce it.
Don't fear the linting warnings and errors :smile:
I can fix them in the evening today
You may look into some older issues like these:
https://github.com/prettier/plugin-pug/issues?q=is%3Aissue+label%3A%22framework%3A+Angular%22 https://github.com/prettier/plugin-pug/issues?q=is%3Aissue+log
I managed to add one test case, unfortunately I didn't found examples to the other warnings 😞
I managed to add one test case, unfortunately I didn't found examples to the other warnings
Hey, think positive :smiley:
-> You already found one console warning message and that is a good start
I think most of the messages where catched due to reports from using Vue
So there where hints to e.g. change pug code to use improved workarounds and that way make your code even better
But I could be false remembering here
I think I will also look into some messages again the next few days and find out how to throw them forcefully in tests
WOW! @SkyaTura I found out that most tests are falling falsely into the default case :confused:
So I think I need to investigate more into it later on what is needed and if the if-cases are not up to date anymore or so :thinking:
But I will do that later, give me some days