Merge branch 'main' into toolbar
This commit is contained in:
73 files changed
+1060
-740
No files matched your search
@@ -12,8 +12,5 @@ insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.hbs]
|
||||
insert_final_newline = false
|
||||
|
||||
[*.{diff,md}]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -56,5 +56,10 @@ module.exports = {
|
||||
plugins: ['node'],
|
||||
extends: ['plugin:node/recommended'],
|
||||
},
|
||||
{
|
||||
// Test files:
|
||||
files: ['tests/**/*-test.{js,ts}'],
|
||||
extends: ['plugin:qunit/recommended'],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
import { registerDeprecationHandler } from '@ember/debug';
|
||||
import config from 'ember-get-config';
|
||||
|
||||
const isTesting = config.environment === 'test';
|
||||
|
||||
export function initialize(/* application */) {
|
||||
if (isTesting) {
|
||||
// Disable all deprecations for now in tests.
|
||||
registerDeprecationHandler((/*message, options, next*/) => {
|
||||
return;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
initialize,
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export { default, initialize } from 'core/initializers/deprecations';
|
||||
@@ -50,7 +50,7 @@
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"doctoc": "^2.0.1",
|
||||
"ember-auto-import": "^1.12.0",
|
||||
"ember-cli": "~3.28.0",
|
||||
"ember-cli": "~3.28.3",
|
||||
"ember-cli-dependency-checker": "^3.2.0",
|
||||
"ember-cli-inject-live-reload": "^2.1.0",
|
||||
"ember-cli-sri": "^2.1.1",
|
||||
@@ -63,7 +63,7 @@
|
||||
"ember-page-title": "^6.2.2",
|
||||
"ember-qunit": "^5.1.4",
|
||||
"ember-resolver": "^8.0.3",
|
||||
"ember-source": "~3.24.0",
|
||||
"ember-source": "~3.28.4",
|
||||
"ember-source-channel-url": "^3.0.0",
|
||||
"ember-template-lint": "^3.7.0",
|
||||
"ember-try": "^1.4.0",
|
||||
@@ -72,6 +72,7 @@
|
||||
"eslint-plugin-ember": "^10.5.4",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-qunit": "^6.2.0",
|
||||
"faker": "^5.5.3",
|
||||
"loader.js": "^4.7.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
@@ -80,7 +81,7 @@
|
||||
"qunit-dom": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10 <=15"
|
||||
"node": ">=12 <=17"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import Application from '@ember/application';
|
||||
|
||||
import config from 'dummy/config/environment';
|
||||
import { initialize } from 'dummy/initializers/deprecations';
|
||||
import { module, test } from 'qunit';
|
||||
import Resolver from 'ember-resolver';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
module('Unit | Initializer | deprecations', function (hooks) {
|
||||
hooks.beforeEach(function () {
|
||||
this.TestApplication = class TestApplication extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
};
|
||||
this.TestApplication.initializer({
|
||||
name: 'initializer under test',
|
||||
initialize,
|
||||
});
|
||||
|
||||
this.application = this.TestApplication.create({ autoboot: false });
|
||||
});
|
||||
|
||||
hooks.afterEach(function () {
|
||||
run(this.application, 'destroy');
|
||||
});
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', async function (assert) {
|
||||
await this.application.boot();
|
||||
|
||||
assert.ok(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user