refactor: 💡 remove ember-get-config dep from core

This commit is contained in:
Randall Morey committed 2021-11-05 13:20:45 -04:00
1 parent 3aae7c124b
commit 8000002b1b
8 files changed
+61 -42

No files matched your search

@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import config from 'ember-get-config';
module('Integration | Helper | doc-url', function (hooks) {
setupRenderingTest(hooks);
test('it renders a URL generated from the documentation config', async function (assert) {
assert.expect(3);
const config = this.owner.resolveRegistration('config:environment');
const baseURL = config.documentation.baseURL;
const path = config.documentation.topics.account;
await render(hbs`{{doc-url 'account'}}`);
@@ -19,7 +19,8 @@ module('Integration | Helper | doc-url', function (hooks) {
test('it throws an error if the specified documentation path cannot be found', async function (assert) {
assert.expect(2);
const helper = this.owner.lookup('helper:doc-url');
const Helper = this.owner.lookup('helper:doc-url');
const helper = new Helper(this.owner);
assert.ok(helper.compute(['account']), 'Specified document exists.');
assert.throws(() => {
helper.compute(['no.such.doc']);