mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
refactor: replace Jest with bun
This commit is contained in:
1 parent
634dc8f987
commit
54225528b3
21 files changed
+66
-856
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import type { IFileExistenceChecker, IFileInput } from '../schema'
|
||||
|
||||
export class MockFileChecker implements IFileExistenceChecker {
|
||||
private files: IFileInput[] = [
|
||||
{
|
||||
path: '/home/user/hello.txt',
|
||||
type: 'file',
|
||||
},
|
||||
{
|
||||
path: '/home/user/world.txt',
|
||||
type: 'file',
|
||||
},
|
||||
{
|
||||
path: '/home/user/Downloads',
|
||||
type: 'directory',
|
||||
},
|
||||
]
|
||||
|
||||
async exists(file: IFileInput): Promise<boolean> {
|
||||
return this.files.some((f) => f.path === file.path && f.type === file.type)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user