mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
83347ac218
This is mostly changes to acceptance tests to allow them to run in both versions of Ember.
30 lines
585 B
JavaScript
30 lines
585 B
JavaScript
export const INPUT_DELAY = 250;
|
|
|
|
let environment = "unknown";
|
|
|
|
export function setEnvironment(e) {
|
|
if (isTesting()) {
|
|
environment = "testing";
|
|
} else {
|
|
environment = e;
|
|
}
|
|
}
|
|
|
|
export function isTesting() {
|
|
return Ember.testing || environment === "testing";
|
|
}
|
|
|
|
// Generally means "before we migrated to Ember CLI"
|
|
let _isLegacy = Ember.VERSION.startsWith("3.12");
|
|
export function isLegacyEmber() {
|
|
return _isLegacy;
|
|
}
|
|
|
|
export function isDevelopment() {
|
|
return environment === "development";
|
|
}
|
|
|
|
export function isProduction() {
|
|
return environment === "production";
|
|
}
|