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