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) {
|
|
|
|
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() {
|
|
|
|
// No-op in pre ember-cli environment
|
|
|
|
},
|
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",
|
|
|
|
].forEach((attr) => {
|
2020-10-27 03:43:29 +08:00
|
|
|
helpers[attr] = function () {
|
|
|
|
return window[attr](...arguments);
|
|
|
|
};
|
|
|
|
});
|
2020-11-18 02:48:03 +08:00
|
|
|
helpers.triggerKeyEvent = window.keyEvent;
|
2020-10-27 03:43:29 +08:00
|
|
|
return helpers;
|
2020-10-10 00:00:46 +08:00
|
|
|
});
|
|
|
|
define("pretender", () => {
|
|
|
|
return { default: window.Pretender };
|
|
|
|
});
|