Skip to content

Commit ff59af6

Browse files
committed
Fix for the broken test
1 parent 73ba8b8 commit ff59af6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/dataApi/deleteNote-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test.serial('Delete a note', (t) => {
4545
.then(function doTest () {
4646
return createNote(storageKey, input1)
4747
.then(function createAttachmentFolder (data) {
48-
fs.mkdirSync(path.join(storagePath, attachmentManagement.DESTINATION_FOLDER, data.noteKey))
48+
fs.mkdirSync(path.join(storagePath.path, attachmentManagement.DESTINATION_FOLDER, data.noteKey))
4949
return data
5050
})
5151
.then(function (data) {
@@ -54,14 +54,14 @@ test.serial('Delete a note', (t) => {
5454
})
5555
.then(function assert (data) {
5656
try {
57-
CSON.readFileSync(path.join(storagePath, 'notes', data.noteKey + '.cson'))
57+
CSON.readFileSync(path.join(storagePath.path, 'notes', data.noteKey + '.cson'))
5858
t.fail('note cson must be deleted.')
5959
} catch (err) {
6060
t.is(err.code, 'ENOENT')
6161
}
6262
})
6363
.then(function assertAttachmentFolderDeleted (data) {
64-
const attachmentFolderPath = path.join(storagePath, attachmentManagement.DESTINATION_FOLDER, data.noteKey)
64+
const attachmentFolderPath = path.join(storagePath.path, attachmentManagement.DESTINATION_FOLDER, data.noteKey)
6565
t.assert(fs.existsSync(attachmentFolderPath) === false, 'Attachment folder was not deleted')
6666
})
6767
})

0 commit comments

Comments
 (0)