2020-10-10 00:00:46 +08:00
|
|
|
// 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,
|
|
|
|
};
|
|
|
|
});
|
2020-10-16 01:56:19 +08:00
|
|
|
let _app;
|
2020-10-10 00:00:46 +08:00
|
|
|
define("@ember/test-helpers", () => {
|
2020-10-27 03:43:29 +08:00
|
|
|
let helpers = {
|
2020-10-16 01:56:19 +08:00
|
|
|
setApplication(app) {
|
|
|
|
_app = app;
|
|
|
|
},
|
|
|
|
getApplication() {
|
|
|
|
return _app;
|
|
|
|
},
|
2020-11-07 09:24:48 +08:00
|
|
|
async settled() {
|
|
|
|
// No-op in pre ember-cli environment
|
|
|
|
},
|
2020-10-10 00:00:46 +08:00
|
|
|
};
|
2020-11-13 05:40:28 +08:00
|
|
|
[
|
|
|
|
"click",
|
|
|
|
"visit",
|
|
|
|
"currentURL",
|
|
|
|
"currentRouteName",
|
|
|
|
"fillIn",
|
|
|
|
"setResolver",
|
|
|
|
].forEach((attr) => {
|
2020-10-27 03:43:29 +08:00
|
|
|
helpers[attr] = function () {
|
|
|
|
return window[attr](...arguments);
|
|
|
|
};
|
|
|
|
});
|
|
|
|
return helpers;
|
2020-10-10 00:00:46 +08:00
|
|
|
});
|
|
|
|
define("pretender", () => {
|
|
|
|
return { default: window.Pretender };
|
|
|
|
});
|