-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b38dcb
commit 5123093
Showing
2 changed files
with
95 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Create a dummy file, with overridden value of given param | ||
* | ||
* @param file | ||
* @returns {*&{path: string, name: string, icon: string, id: string, _id: string, dir_id: string, type: string}} a dummy file | ||
*/ | ||
export const dummyFile = file => ({ | ||
name: 'name', | ||
id: 'id-file', | ||
_id: 'id-file', | ||
icon: 'icon', | ||
path: '/path', | ||
type: 'directory', | ||
...file | ||
}) | ||
|
||
/** | ||
* Create a dummy note, with overridden value of given param | ||
* | ||
* @param note | ||
* @returns {*&{path: string, name: string, icon: string, id: string, _id: string, dir_id: string, type: string}} a dummy note | ||
*/ | ||
export const dummyNote = note => ({ | ||
...dummyFile(), | ||
type: 'file', | ||
metadata: { | ||
content: '', | ||
schema: '', | ||
title: '', | ||
version: '' | ||
}, | ||
...note | ||
}) |