Skip to content

Commit

Permalink
Failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Jan 10, 2025
1 parent 30cb76b commit 9b8c7dd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test-app/tests/integration/components/json-viewer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,23 @@ module('Integration | Component | json-viewer', function (hooks) {
assert.strictEqual(userSelectStyle, expected);
}
});

test('no comma after final object', async function (assert) {
this.set('json', {
obj: { foo: 'bar' },
});
await render(
hbs`<JsonViewer data-test-json-viewer-outer @json={{this.json}} />`,
);

assert
.dom('[data-path="$.obj>"]')
.containsText('}', 'object closing brace is present');
assert
.dom('[data-path="$.obj@,"]')
.doesNotExist('no comma after final object');
assert
.dom('[data-test-json-viewer-outer]')
.doesNotContainText(',', 'No comma appears in the output');
});
});

0 comments on commit 9b8c7dd

Please sign in to comment.