mindly.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mindly.Social is an English speaking, friendly Mastodon instance created for people who want to use their brains and their hearts to make social networking more social. 🧠💖

Administered by:

Server stats:

1.2K
active users

#webtestrunner

0 posts0 participants0 posts today
Continued thread

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.

github.com/modernweb-dev/web/i

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.

GitHubConcurrent tests don't call `requestAnimationFrame` consistently with Puppeteer · Issue #2588 · modernweb-dev/webBy dgp1130
Continued thread

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.

Replied to westbrook

@westbrook I *think* I got all the options. I don't see anything else in your example which looks related.

github.com/dgp1130/composite-w

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...

GitHubWIP · dgp1130/composite-weak-map@49c0937Contribute to dgp1130/composite-weak-map development by creating an account on GitHub.
Replied to westbrook

@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?

github.com/adobe/spectrum-web-

GitHubspectrum-web-components/web-test-runner.utils.js at e5a1a61bae448005abab9e6aa1a4be5c3efa3372 · adobe/spectrum-web-componentsSpectrum Web Components. Contribute to adobe/spectrum-web-components development by creating an account on GitHub.

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: dev.to/westbrook/testing-web-c

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: modern-web.dev/docs/test-runne

DEV CommunityTesting Web Components with @web/test-runnerSo, you write web components and you're interested in expanding the work you put into unit testing...