Skip to content

Commit fe8ff93

Browse files
committed
#608: updated tests
1 parent 9cc759e commit fe8ff93

File tree

2 files changed

+6
-37
lines changed

2 files changed

+6
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,14 @@
11

22
import { NotImplemented } from '@jitar/errors';
3-
import { File, FileManager, FileNotFound, SourcingManager } from '@jitar/sourcing';
3+
import { File, FileNotFound, Module, LocalSourcingManager } from '@jitar/sourcing';
44

55
import { FILENAMES } from './filenames.fixture';
66
import { FILES } from './files.fixtures';
77

8-
class DummyFileManager implements FileManager
8+
class DummySourcingManager extends LocalSourcingManager
99
{
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-
2710
// 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[]>
3512
{
3613
throw new NotImplemented();
3714
}
@@ -52,25 +29,17 @@ class DummyFileManager implements FileManager
5229
}
5330
}
5431

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-
6132
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6233
delete(filename: string): Promise<void>
6334
{
6435
throw new NotImplemented();
6536
}
6637

6738
// eslint-disable-next-line @typescript-eslint/no-unused-vars
68-
filter(pattern: string): Promise<string[]>
39+
import(filename: string): Promise<Module>
6940
{
7041
throw new NotImplemented();
7142
}
7243
}
7344

74-
const fileManager = new DummyFileManager();
75-
76-
export const sourcingManager = new SourcingManager(fileManager);
45+
export const sourcingManager = new DummySourcingManager('');

packages/sourcing/test/fixtures/TestFileSystem.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
import path from 'path';
33

4-
import LocalFileSystem from '../../src/LocalFileSystem';
4+
import LocalFileSystem from '../../src/files/LocalFileSystem';
55

66
export default class TestFileSystem extends LocalFileSystem
77
{

0 commit comments

Comments
 (0)