-
Notifications
You must be signed in to change notification settings - Fork 781
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
feature: Make it possible to load QUnit after domReady #1059
Comments
@TobiasOetzel I use QUnit with RequireJS at my workplace, and we're able to stop the test runner from executing prematurely with this code: QUnit.config.autostart = false;
require(['path/to/tests'], function () {
QUnit.start();
}); In your JSBin, I do see the test being executed. Can you please explain the exact issue? Is the test starting too soon? |
Didn't dig into the example at this moment, but want to mention that this sounds similar to a suggestion brought up in jonkemp/qunit-phantomjs-runner#11 (comment). |
@platinumazure @trentmwillis Yes this looks exactly like the issue you pointed to. How is the state of the discussion? I saw some extra phantomJS code. |
No movement really, left off with needing to define an API for it. |
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes qunitjs#1059
If a global QUnit.config object is present before QUnit is loaded, the default config values will be extended. The use case is to configure QUnit before it is loaded. Closes #1059
Without this fix, QUnit 1.x starts its queue immediately when it is loaded after DOMContentloaded. Test providers have no chance to configure autostart:false in that case. The fix is a downport of QUnit's own fix for qunitjs/qunit#1059 . Change-Id: If806792ddb21a79eeb71b59ab33dc443aa29934c
I am using QUnit together with OpenUI5
UI5 comes with its own amd syntax similar to require.js.
It would be nice to be able to load QUnit asynchronously to provide a test environment from the framework side.
How i would imagine it is that you could define a global QUnit config before QUnit itself is loaded
window.QUnit = { config: { autostart: false } };
When QUnit is loaded, it takes this config and extends it with the needed defaults. Here is a full jsbin outlining the problem
If you like the idea i would create a pull request for it. I just wanted to discuss it upfront.
The text was updated successfully, but these errors were encountered: