Skip to content

Conversation

@sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Mar 9, 2021

This will start fetching the axe script earlier, giving some performance improvements.
Also, should help in avoiding jasmine timeouts that we often get in CI [^1].

Extracted from https://github.com/w3c/respec/pull/3319

[^1]

  Core — a11y
    ✖ allows overriding options (slow: 5.003 secs)
      Firefox 86.0 (Ubuntu 0.0.0)
    Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 7048)
    <Jasmine>

@sidvishnoi sidvishnoi requested a review from marcoscaceres March 9, 2021 20:33

async function executePreparePass(runnables, config) {
for (const plug of runnables.filter(p => p.prepare)) {
config.state[plug.name] = {};
Copy link
Contributor

@marcoscaceres marcoscaceres Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... not a fan of attaching more stuff to config. Why not have this as an internal state inside the plugin itself?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins can share state among them.
I plan to add a state arg to all functions, but conf.state was easier for starters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest doing that now... look at what happened with my terrible linter API :( I kept saying, "I'll fix it next week... I'll fix it next week..." and years later, still there 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants