1
1
2
2
import { NotImplemented } from '@jitar/errors' ;
3
- import { File , FileManager , FileNotFound , SourcingManager } from '@jitar/sourcing' ;
3
+ import { File , FileNotFound , Module , LocalSourcingManager } from '@jitar/sourcing' ;
4
4
5
5
import { FILENAMES } from './filenames.fixture' ;
6
6
import { FILES } from './files.fixtures' ;
7
7
8
- class DummyFileManager implements FileManager
8
+ class DummySourcingManager extends LocalSourcingManager
9
9
{
10
- getRootLocation ( ) : string
11
- {
12
- throw new NotImplemented ( ) ;
13
- }
14
-
15
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
- getAbsoluteLocation ( filename : string ) : string
17
- {
18
- throw new NotImplemented ( ) ;
19
- }
20
-
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
- getRelativeLocation ( filename : string ) : string
23
- {
24
- throw new NotImplemented ( ) ;
25
- }
26
-
27
10
// eslint-disable-next-line @typescript-eslint/no-unused-vars
28
- getType ( filename : string ) : Promise < string >
29
- {
30
- throw new NotImplemented ( ) ;
31
- }
32
-
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
- getContent ( filename : string ) : Promise < Buffer | string >
11
+ filter ( pattern : string ) : Promise < string [ ] >
35
12
{
36
13
throw new NotImplemented ( ) ;
37
14
}
@@ -52,25 +29,17 @@ class DummyFileManager implements FileManager
52
29
}
53
30
}
54
31
55
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
56
- write ( filename : string , content : string ) : Promise < void >
57
- {
58
- throw new NotImplemented ( ) ;
59
- }
60
-
61
32
// eslint-disable-next-line @typescript-eslint/no-unused-vars
62
33
delete ( filename : string ) : Promise < void >
63
34
{
64
35
throw new NotImplemented ( ) ;
65
36
}
66
37
67
38
// eslint-disable-next-line @typescript-eslint/no-unused-vars
68
- filter ( pattern : string ) : Promise < string [ ] >
39
+ import ( filename : string ) : Promise < Module >
69
40
{
70
41
throw new NotImplemented ( ) ;
71
42
}
72
43
}
73
44
74
- const fileManager = new DummyFileManager ( ) ;
75
-
76
- export const sourcingManager = new SourcingManager ( fileManager ) ;
45
+ export const sourcingManager = new DummySourcingManager ( '' ) ;
0 commit comments