Turns out, not a #Chrome bug instead a #WebTestRunner / #Puppeteer bug. Apparently concurrent tests run multiple tabs in the same window by default. This means only one page is visible and pages in the background don't update consistently, meaning `requestAnimationFrame` just doesn't get called sometimes.
https://github.com/modernweb-dev/web/issues/2588
This is fixable by giving each test its own window, so every test is always visible.
Definitely not an obvious workaround though, so hopefully this is something which can be fixed by default.
Took a while to debug this one, but I was writing some tests which I discovered to be flaky for uncelar reasons. After a lot of digging, I was able to confirm a minimal test case where the requestA...
Pretty convinced I've got a Chrome bug on my hands here at this point.
Took all night, but I was able to narrow down the test cases to two files <15 lines each failing on latest #WebTestRunner and #Puppeteer.
Last step is to strip #Jasmine from this and see if I can reproduce similar behavior with `setTimeout`, then file the bug.
I've tried to get a minimal reproduction but this _literally_ takes at least 6 tests across 2 different files to replicate. Disabling any _one_ test fixes all of them. No shared state between them which I can find. The two files *should* be completely isolated from each other anyways (using #WebTestRunner).
I'm completely baffled here.
@westbrook I *think* I got all the options. I don't see anything else in your example which looks related.
Even outside #WebTestRunner I can't get it to work. Just running the #Chrome binary directly with those flags doesn't work either. There must be some other condition for `window.gc` I'm not finding...
@westbrook Ooh, that's very cool. I was not aware of that API.
I'm trying to copy what you did there and was able to spawn #WebTestRunner with `measureUserAgentSpecificMemory`, but for the life of me can't get `window.gc` to be defined. I'm setting the `--expose-gc` flag just like you seem to, but I can't get Chrome to start with it. Is there some other special incantation I need to do this?
@VamptVo Sounds like you're looking for #WebTestRunner?
Building on this area...
Testing is like a magic power, but lean into magic realism over magic fantasy for better results: https://dev.to/westbrook/testing-with-js-is-like-magic-but-is-it-science-23f8
Now to get to work on the next installation!
#Angular announcement: We're moving Angular to #Jest and #WebTestRunner.
We've seen a lot of movement in the web testing ecosystem towards Jest and want to make it more available for #AngularCLI users.
We've also been particular impressed with Web Test Runner and are looking forward to bringing it into the Angular ecosystem as well.
Check out the #AngularBlog for all the details:
https://medium.com/angular-blog/moving-angular-cli-to-jest-and-web-test-runner-ef85ef69ceca
So, if you're into #webComponents...
And, more importantly #testing them...
And, most importantly doing it with #webTestRunner...
Then you might be into the new post I wrote: https://dev.to/westbrook/testing-web-components-with-webtest-runner-51g6
Looking to make this part of series where I touch on a whole bunch of extended techniques and practices that I've found useful in this area, so share your thoughts in the comments or in response this toot.
Learn more about @web/test-runner here: https://modern-web.dev/docs/test-runner/overview/