Skip to content

Commit 31e93e6

Browse files
committed
Improve code example in part4b
1 parent 82ef2aa commit 31e93e6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/content/4/en/part4b.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ Next, let's write tests for fetching and removing an individual note:
723723
```js
724724
test('a specific note can be viewed', async () => {
725725
const notesAtStart = await helper.notesInDb()
726-
727726
const noteToView = notesAtStart[0]
728727

729728
// highlight-start
@@ -748,7 +747,7 @@ test('a note can be deleted', async () => {
748747

749748
const notesAtEnd = await helper.notesInDb()
750749

751-
const contents = notesAtEnd.map(r => r.content)
750+
const contents = notesAtEnd.map(n => n.content)
752751
assert(!contents.includes(noteToDelete.content))
753752

754753
assert.strictEqual(notesAtEnd.length, helper.initialNotes.length - 1)

src/content/4/fi/osa4b.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,6 @@ Tehdään sitten testit yksittäisen muistiinpanon tietojen katsomiselle ja muis
718718
```js
719719
test('a specific note can be viewed', async () => {
720720
const notesAtStart = await helper.notesInDb()
721-
722721
const noteToView = notesAtStart[0]
723722

724723
// highlight-start
@@ -743,7 +742,7 @@ test('a note can be deleted', async () => {
743742

744743
const notesAtEnd = await helper.notesInDb()
745744

746-
const contents = notesAtEnd.map(r => r.content)
745+
const contents = notesAtEnd.map(n => n.content)
747746
assert(!contents.includes(noteToDelete.content))
748747

749748
assert.strictEqual(notesAtEnd.length, helper.initialNotes.length - 1)

0 commit comments

Comments
 (0)