mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 22:50:45 +08:00
e634513568
Previously they were global functions.
40 lines
819 B
JavaScript
40 lines
819 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;
|
|
},
|
|
};
|
|
["click", "visit", "currentURL", "fillIn", "setResolver"].forEach((attr) => {
|
|
helpers[attr] = function () {
|
|
return window[attr](...arguments);
|
|
};
|
|
});
|
|
return helpers;
|
|
});
|
|
define("pretender", () => {
|
|
return { default: window.Pretender };
|
|
});
|