Skip to content
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

Core: Refactor internal ProcessingQueue into class #1740

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Feb 9, 2024

This is motivated by the last remaining build warning from Rollup:

src/qunit.js → qunit/qunit.js...
(!) Circular dependency
src/test.js -> src/core/processing-queue.js -> src/test.js
created qunit/qunit.js in 2s

ProcessingQueue needs access to the test function defined in test.js.

Fix by turning the module into a class, that we create a singleton of in core.js (with access to test.js) and then use that singleton where we previously used ProcessingQueue statically.

This is motivated by the last remaining build warning from Rollup:

> src/qunit.js → qunit/qunit.js...
> (!) Circular dependency
> src/test.js -> src/core/processing-queue.js -> src/test.js
> created qunit/qunit.js in 2s

ProcessingQueue needs access to the `test` function defined in test.js.

Fix by turning the module into a class, that we create a singleton
of in core.js (with access to test.js) and then use that singleton
where we previously used ProcessingQueue statically.
@Krinkle Krinkle merged commit d60f27c into qunitjs:main Feb 9, 2024
10 checks passed
@Krinkle Krinkle deleted the refactor-pq-instance branch February 9, 2024 20:27
@Krinkle
Copy link
Member Author

Krinkle commented Feb 15, 2024

@izelnakri FYI: You'll want to update qunitx to where it resets the internal ProcessingQueue.finished to reset config.pq.finished instead!

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

Successfully merging this pull request may close these issues.

1 participant