-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Improve testing for typescript types and bundle.js #130
Comments
Testing of the browser will be fixed with #163 |
Hey @derberg . I am fairly new in the async-api environment and just recently had a look at all the tools available. |
Yep good catch @kaibra. Since we aren't trying to parse a file but parsing a string here parser-js/test/sample_browser/index.html Line 15 in 932d2dd
it is not triggered. Should be easily tested by parsing file instead of string in another test 😄 |
why would you try to parse a file client-side? 🤔 |
I came to this point by looking at the react component, which has the parser as a dependency.
I think you have a problem with your test-setup.
https://www.npmjs.com/package/browserify Looking at your bundle.js, indeed it is:
|
Good point, don't even think it is possible without it being an url, didn't realize this yesterday 🤦
@kaibra are you saying that you are unable to parse a string with the react component?
Looked a bit further into this, and tried downloading the generated parser bundle with the browser test and opened it in Chrome where it worked fine. I tried to dig further into why the tests parses while accessing node js variables, but yea |
@kaibra exactly, browserify handles I do not remember how react component handles that without using the official bundle but as you can see, the latest version is used here https://asyncapi.github.io/asyncapi-react/ and works well. would be great if you could report a bug separately with an error message in the details. |
Thanks for your responses. For some reason I thought the bundle.js is just used for testing. |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
Following asyncapi/asyncapi-react#255, issue is postponed until React component is refactored to use the majority of types from the parser-js. |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
@derberg Can we close this one? In Parser v2 we have improved testing of browser version https://github.com/asyncapi/parser-js/blob/next-major/test/browser/browser.spec.ts for TS types we don't need any tests - lib is written in TS so we don't have any regression between versions, only when someone will write incorrect types, but we will see that in linter stage. |
Reason/Context
bundle.js
by introducing a library that doesn't work in the browser. I don't want to break it again, but I also know that when you choose a library, it is not a common habit to check if it is isomorphic (working both on server and browser). We need a way to test if the PR is not causingbundle.js
to failI think testing of above can be solved with one sample project, like under one umbrella.
Description
we need some sample project in TS that will also have a
ui
where we can run parser and test result withpuppeteer. I was thinking that we might use
asyncapi-react
as it is already a TS project with UI but, but based on my experience, I know that it might look like best and easiest solution but it can backfire over time and writing a simple test project might be much more efficient.The text was updated successfully, but these errors were encountered: