@@ -14,43 +14,43 @@ import {
14
14
const getFileInfoTests = [
15
15
{
16
16
input : [ { path : 'static/workbench/quick-guides/file-name.txt' } ] ,
17
- expected : { name : 'file-name' , parent : 'quick guides' , extension : 'txt' , location : '/static/workbench/quick-guides' , _key : null }
17
+ expected : { name : 'file-name' , parent : 'quick guides' , extension : 'txt' , location : '/static/workbench/quick-guides' , label : 'file-name' , _key : null }
18
18
} ,
19
19
{
20
20
input : [ { path : 'parent_folder\\file_name.txt' } ] ,
21
- expected : { name : 'file_name' , parent : 'parent folder' , extension : 'txt' , location : '/parent_folder' , _key : null }
21
+ expected : { name : 'file_name' , parent : 'parent folder' , extension : 'txt' , location : '/parent_folder' , label : 'file_name' , _key : null }
22
22
} ,
23
23
{
24
24
input : [ { path : 'https://domen.com/workbench/enablement-area/introduction.html' } ] ,
25
- expected : { name : 'introduction' , parent : 'enablement area' , extension : 'html' , location : '/workbench/enablement-area' , _key : null }
25
+ expected : { name : 'introduction' , parent : 'enablement area' , extension : 'html' , location : '/workbench/enablement-area' , label : 'introduction' , _key : null }
26
26
} ,
27
27
{
28
28
input : [ { path : 'https://domen.com/introduction.html' } ] ,
29
- expected : { name : 'introduction' , parent : '' , extension : 'html' , location : '' , _key : null }
29
+ expected : { name : 'introduction' , parent : '' , extension : 'html' , location : '' , label : 'introduction' , _key : null }
30
30
} ,
31
31
{
32
32
input : [ { path : '/introduction.html' } ] ,
33
- expected : { name : 'introduction' , parent : '' , extension : 'html' , location : '' , _key : null }
33
+ expected : { name : 'introduction' , parent : '' , extension : 'html' , location : '' , label : 'introduction' , _key : null }
34
34
} ,
35
35
{
36
36
input : [ { path : '//parent/markdown.md' } ] ,
37
- expected : { name : '' , parent : '' , extension : '' , location : '' }
37
+ expected : { name : '' , parent : '' , extension : '' , location : '' , label : '' , }
38
38
} ,
39
39
{
40
40
input : [ { path : '/file.txt' } ] ,
41
- expected : { name : 'file' , parent : '' , extension : 'txt' , location : '' , _key : null }
41
+ expected : { name : 'file' , parent : '' , extension : 'txt' , location : '' , label : 'file' , _key : null }
42
42
} ,
43
43
{
44
44
input : [ { path : '' } ] ,
45
- expected : { name : '' , parent : '' , extension : '' , location : '' , _key : null }
45
+ expected : { name : '' , parent : '' , extension : '' , location : '' , label : '' , _key : null }
46
46
} ,
47
47
{
48
48
input : [ { path : '/' } ] ,
49
- expected : { name : '' , parent : '' , extension : '' , location : '' , _key : null }
49
+ expected : { name : '' , parent : '' , extension : '' , location : '' , label : '' , _key : null }
50
50
} ,
51
51
{
52
52
input : [ { manifestPath : 'quick-guides/0/0' , path : '/static/workbench/quick-guides/document/learn-more.md' } , MOCK_GUIDES_ITEMS ] ,
53
- expected : { name : 'learn-more' , parent : MOCK_GUIDES_ITEMS [ 0 ] . label , extension : 'md' , location : '/static/workbench/quick-guides/document' , _key : '0' }
53
+ expected : { name : 'learn-more' , parent : MOCK_GUIDES_ITEMS [ 0 ] . label , extension : 'md' , location : '/static/workbench/quick-guides/document' , label : MOCK_GUIDES_ITEMS [ 0 ] . children [ 0 ] . label , _key : '0' }
54
54
}
55
55
]
56
56
0 commit comments