Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Replace auto-load with "loader" function #171

Closed
trentmwillis opened this issue Feb 17, 2017 · 1 comment
Closed

Replace auto-load with "loader" function #171

trentmwillis opened this issue Feb 17, 2017 · 1 comment
Assignees

Comments

@trentmwillis
Copy link
Member

I think we should move away from having the tests "automagically" load; I'd like to see us move to something more explicit.

We should provide a "loader" function that consumers invoke from their test-helper.js file. This should allow us to remove the ready logic and the setTimeout while also providing an easy way for users to reason about how their tests get loaded. It would also make it easier to pass options to ember-cli-qunit without having to use the global QUnit.config object.

Thoughts?

Originally brought up here: #155 (comment)

@rwjblue
Copy link
Member

rwjblue commented Mar 23, 2017

Yes, agreed.

We should move https://github.com/ember-cli/ember-cli-qunit/blob/master/vendor/ember-cli-qunit/test-loader.js#L24-L68 to our own addon-test-support directory (and rewrite to use normal import statements), then have consumers do something like this in thier test-helper.js:

import { TestLoader } from 'ember-cli-qunit/test-support';

TestLoader.load();

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

No branches or pull requests

2 participants