meilisearch-admin/tests/unit/initializers/custom-inflector-rules-test.js

33 lines
872 B
JavaScript
Raw Normal View History

2021-01-27 14:12:19 +00:00
import Application from '@ember/application';
import { initialize } from 'meilisearch-admin/initializers/custom-inflector-rules';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
import { run } from '@ember/runloop';
2022-03-21 11:45:47 +00:00
module('Unit | Initializer | custom-inflector-rules', function (hooks) {
hooks.beforeEach(function () {
this.TestApplication = class TestApplication extends Application {};
2021-01-27 14:12:19 +00:00
this.TestApplication.initializer({
name: 'initializer under test',
2022-03-21 11:45:47 +00:00
initialize,
2021-01-27 14:12:19 +00:00
});
2022-03-21 11:45:47 +00:00
this.application = this.TestApplication.create({
autoboot: false,
Resolver,
});
2021-01-27 14:12:19 +00:00
});
2022-03-21 11:45:47 +00:00
hooks.afterEach(function () {
2021-01-27 14:12:19 +00:00
run(this.application, 'destroy');
});
// TODO: Replace this with your real tests.
2022-03-21 11:45:47 +00:00
test('it works', async function (assert) {
2021-01-27 14:12:19 +00:00
await this.application.boot();
assert.ok(true);
});
});