Open
Conversation
25327f8 to
f7d5638
Compare
f7d5638 to
e6fa6f2
Compare
d05cafc to
c6858a6
Compare
e6fa6f2 to
d598ebd
Compare
c6858a6 to
8bed678
Compare
d598ebd to
b311011
Compare
8bed678 to
5876dd2
Compare
c1519dc to
79b04e5
Compare
5876dd2 to
5661c8b
Compare
0c9775a to
68ec707
Compare
68ec707 to
049153c
Compare
049153c to
747a27d
Compare
79d70d3 to
745d8ce
Compare
aab2c57 to
06215ab
Compare
b57e8fc to
6d0ee0d
Compare
6d0ee0d to
84e7662
Compare
…ult, param filters
|
✅ Automated performance checks have passed on commit DetailsPerformance tests 1st run outputNo significative change in performance for tests:
|
|
✅ Automated performance checks have passed on commit DetailsPerformance tests 1st run outputNo significative change in performance for tests:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This mega-PR rewrites unit tests so they can be run in a web browser (for now Chrome + Firefox), through
webdriverio- just like our integration and memory tests.This allows us to run unit tests in the actual environment where the RxPlayer will run and to have a common script + environment for unit, integration and memory tests, thus simplifying the project.
The main difficulty was linked to our over-reliance on
vitest'sdoMock+importActualfunctions, the second which has a different behavior when run in a web browser: multipleimportActualcalls in the same test file won't re-evaluate that imported file. This means thatdoMockperformed in-betweenimportActualcalls for the same file won't have an impact on that file.This might be fixed in the future, but I wanted to see how most people succeeded to run
vitestin a browser. It seems that relying on a top-levelmockfunction is much more idiomatic, while relying on thehoistedfunction to also declare hoisted mocks whose implementation can change in-between tests.Though, to ensure portability between test frameworks if we ever change it (JavaScript is like that sometimes), I try to limit reliance on that
vitest-specificvi.mock/vi.hoistedconcept, by prefering just mocking through only the more portablespyOnwhen possible.