discourse/app/assets/javascripts/test-shims.js
Robin Ward b460a6d059 REFACTOR: Continue to converge on what Ember CLI wants us to do
* The creation of a testing div is specific to Rails, so that is
moved back out of setupTests();

* We've removed the `Discourse` globals from the acceptance helpers in favor of
`setApplication`/`getApplication`.

* We pass the container to setupTests because there is no
`__container__` in later Ember versions.

* `App` is now `app` because it's not a constant or class, it's an
instance of an application.
2020-10-16 10:53:13 -04:00

38 lines
725 B
JavaScript

// discourse-skip-module
define("sinon", () => {
return { default: window.sinon };
});
define("qunit", () => {
return {
default: window.QUnit,
test: window.QUnit.test,
skip: window.QUnit.skip,
module: window.QUnit.module,
};
});
define("ember-qunit", () => {
return {
moduleFor: window.moduleFor,
moduleForComponent: window.moduleForComponent,
};
});
let _app;
define("@ember/test-helpers", () => {
return {
setResolver: window.setResolver,
setApplication(app) {
_app = app;
},
getApplication() {
return _app;
},
visit() {
return window.visit(...arguments);
},
};
});
define("pretender", () => {
return { default: window.Pretender };
});