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) {
|
|
|
|
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() {
|
|
|
|
// No-op in pre ember-cli environment
|
|
|
|
},
|
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 };
|
|
|
|
});
|