mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 06:15:48 +08:00
3fc5671e40
This change should be quite safe as it only adds extra support for imports rather than global variables.
51 lines
957 B
JavaScript
51 lines
957 B
JavaScript
// 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,
|
|
};
|
|
});
|
|
let _app;
|
|
define("@ember/test-helpers", () => {
|
|
let helpers = {
|
|
setApplication(app) {
|
|
_app = app;
|
|
},
|
|
getApplication() {
|
|
return _app;
|
|
},
|
|
async settled() {
|
|
// No-op in pre ember-cli environment
|
|
},
|
|
};
|
|
[
|
|
"click",
|
|
"visit",
|
|
"currentURL",
|
|
"currentRouteName",
|
|
"fillIn",
|
|
"setResolver",
|
|
"keyEvent",
|
|
].forEach((attr) => {
|
|
helpers[attr] = function () {
|
|
return window[attr](...arguments);
|
|
};
|
|
});
|
|
return helpers;
|
|
});
|
|
define("pretender", () => {
|
|
return { default: window.Pretender };
|
|
});
|