-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
[Typescript] Convert tests to jest and karma #273
Comments
Does any one work on this? I am making my first steps with jest here: https://github.com/maplibre/maplibre-gl-js/compare/main...astridx:jest?expand=1 I would find it good to develop the new tests in parallel in a separate directory. What is your opinion on this? I have looked at codemods: https://jestjs.io/docs/migration-guide |
I'm not aware of anyone currently working on this. |
If I understood the Slack discussion correctly it might actually be an option to convert all tests to karma exclusively, right @webberig? |
There are 197 files in |
I think there shouldn't be a problem to run some test using one framework and other using another framework. |
Was it decided whether to use jest or karma? |
I don't think we came to a conclusion. |
I always get this feeling that we found an acient city that people have built in the past but now they are not there anymore an we try to understand why they did things the way they did them. The number of render and query tests is really impressive and I am super glad that migrating them will probably only mean editing one or two files. When it comes to unit tests it looks like there is more handarbeit involved. |
Regarding frameworks I would tend to jest at the moment. A good starting point could be to migrate a single unit test from tap to jest and add a script to package.json to run jest and tap side by side. Would be nice because we could merge to the main branch. |
This is spot on! :-) |
Do you mean something like here: #331 |
I've added my remarks there. It would be better if you describe what you did and what you plan to do so we can have a better understanding of the big picture. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is in progress now. |
So how close are we to remove the |
Only image_source is left on the unit test side of things. |
Only image_source (#732) and browser test (#810 ), then I believe we can remove tap. I tried to get an overview in the milestone https://github.com/maplibre/maplibre-gl-js/milestone/4 |
For rendering tests, one option could be something like cypress. I'm sure there are other good tools out there, just wanted to put it on the table. |
I would say that cypress should replace sellenium (browser) tests. |
Also, playwright seem to pick up tracktion in the e2e space. |
Interesting, this is the first time I'm hearing about it. |
Current tests are using
tap
andtestem
which are not commonly used test runners.We should use the industry standard in order to make sure we don't get stuck in an old version that doesn't support changes.
This applies to node running tests such as
test-unit
,test-build
,test-query
.This also applies to browser tests such as
test-query
.This is a big task, so I decided not to do it as part of #209.
The text was updated successfully, but these errors were encountered: