Skip to content

Commit f59d0ff

Browse files
authored
Update simple-component.md
Trim the textContent in test at line 323 and also update the final example (line 377) to match
1 parent edd1a6c commit f59d0ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/v3.3.0/tutorial/simple-component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ In the first test, we just want to verify the output of the component, so we jus
320320
```javascript {data-filename="tests/integration/components/rental-listing-test.js" data-diff="+3,+4"}
321321
test('should display rental details', function(assert) {
322322
await render(hbs`{{rental-listing rental=rental}}`);
323-
assert.equal(this.element.querySelector('.listing h3').textContent, 'test-title', 'Title: test-title');
323+
assert.equal(this.element.querySelector('.listing h3').textContent.trim(), 'test-title', 'Title: test-title');
324324
assert.equal(this.element.querySelector('.listing .owner').textContent.trim(), 'Owner: test-owner', 'Owner: test-owner');
325325
});
326326
```
@@ -374,7 +374,7 @@ module('Integration | Component | rental listing', function (hooks) {
374374

375375
test('should display rental details', async function(assert) {
376376
await render(hbs`{{rental-listing rental=rental}}`);
377-
assert.equal(this.element.querySelector('.listing h3').textContent, 'test-title', 'Title: test-title');
377+
assert.equal(this.element.querySelector('.listing h3').textContent.trim(), 'test-title', 'Title: test-title');
378378
assert.equal(this.element.querySelector('.listing .owner').textContent.trim(), 'Owner: test-owner', 'Owner: test-owner');
379379
});
380380

0 commit comments

Comments
 (0)