-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jest): 81% coverage for FilSystem.test.ts (#2427)
- Loading branch information
Showing
2 changed files
with
312 additions
and
1 deletion.
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
300 changes: 300 additions & 0 deletions
300
libraries/Files/test/__snapshots__/FilSystem.test.ts.snap
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,300 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test FilSystem Correctly returns filesystem content 1`] = ` | ||
Array [ | ||
Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory", | ||
"_parent": Directory { | ||
"_children": Map { | ||
"Test Directory" => [Circular], | ||
"Test Directory copy" => Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory copy", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"second dir" => Directory { | ||
"_children": Map { | ||
"TestFile.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "TestFile.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"testPng2.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "testPng2.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"abc.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "abc.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"cc123.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "cc123.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "second dir", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "root", | ||
"_parent": null, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory copy", | ||
"_parent": Directory { | ||
"_children": Map { | ||
"Test Directory" => Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"Test Directory copy" => [Circular], | ||
"second dir" => Directory { | ||
"_children": Map { | ||
"TestFile.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "TestFile.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"testPng2.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "testPng2.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"abc.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "abc.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"cc123.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "cc123.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "second dir", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "root", | ||
"_parent": null, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
Directory { | ||
"_children": Map { | ||
"TestFile.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "TestFile.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"testPng2.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "testPng2.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"abc.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "abc.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
"cc123.png" => Fil { | ||
"_description": "Test file description", | ||
"_file": undefined, | ||
"_hash": "0x0aef", | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "cc123.png", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_size": 4337487, | ||
"_thumbnail": "", | ||
"_type": "generic", | ||
}, | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "second dir", | ||
"_parent": Directory { | ||
"_children": Map { | ||
"Test Directory" => Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"Test Directory copy" => Directory { | ||
"_children": Map {}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "Test Directory copy", | ||
"_parent": [Circular], | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"second dir" => [Circular], | ||
}, | ||
"_id": "testid", | ||
"_liked": false, | ||
"_modified": 1645617999076, | ||
"_name": "root", | ||
"_parent": null, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
"_shared": false, | ||
"_type": "DEFAULT", | ||
}, | ||
] | ||
`; |