meilisearch-admin/tests/integration/helpers/json-parse-test.js

18 lines
518 B
JavaScript
Raw Normal View History

2022-03-28 11:20:06 +00:00
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Helper | json-parse', function (hooks) {
setupRenderingTest(hooks);
// TODO: Replace this with your real tests.
test('it renders', async function (assert) {
2022-09-18 14:18:04 +00:00
this.set('inputValue', '[1, 2, 3]');
2022-03-28 11:20:06 +00:00
await render(hbs`{{json-parse this.inputValue}}`);
2022-09-18 14:18:04 +00:00
assert.dom(this.element).hasText('1,2,3');
2022-03-28 11:20:06 +00:00
});
});