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-11-26 01:57:15 +08:00
|
|
|
define("htmlbars-inline-precompile", () => {
|
|
|
|
return {
|
|
|
|
default: function (str) {
|
2022-03-10 00:54:07 +08:00
|
|
|
// eslint-disable-next-line no-undef
|
2020-11-26 01:57:15 +08:00
|
|
|
return Ember.HTMLBars.compile(str[0]);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
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() {
|
2022-03-08 03:00:09 +08:00
|
|
|
// eslint-disable-next-line no-undef, discourse-ember/global-ember
|
|
|
|
Ember.run(() => {});
|
2020-11-07 09:24:48 +08:00
|
|
|
},
|
2020-11-20 22:54:09 +08:00
|
|
|
TestModuleForComponent: window.TestModuleForComponent,
|
2020-10-10 00:00:46 +08:00
|
|
|
};
|
2020-11-13 05:40:28 +08:00
|
|
|
[
|
|
|
|
"click",
|
|
|
|
"visit",
|
|
|
|
"currentURL",
|
|
|
|
"currentRouteName",
|
|
|
|
"fillIn",
|
|
|
|
"setResolver",
|
2021-02-01 22:01:47 +08:00
|
|
|
"triggerEvent",
|
2020-11-13 05:40:28 +08:00
|
|
|
].forEach((attr) => {
|
2020-10-27 03:43:29 +08:00
|
|
|
helpers[attr] = function () {
|
|
|
|
return window[attr](...arguments);
|
|
|
|
};
|
|
|
|
});
|
2021-02-04 03:22:20 +08:00
|
|
|
helpers.triggerKeyEvent = function () {
|
|
|
|
return window.keyEvent(...arguments);
|
|
|
|
};
|
2020-10-27 03:43:29 +08:00
|
|
|
return helpers;
|
2020-10-10 00:00:46 +08:00
|
|
|
});
|
|
|
|
define("pretender", () => {
|
|
|
|
return { default: window.Pretender };
|
|
|
|
});
|