Added unit tests

This commit is contained in:
DaanV2
2021-08-18 20:15:02 +02:00
parent dccbc643eb
commit 7dfdb0802c
12 changed files with 293 additions and 42 deletions

View File

@@ -1,11 +1,28 @@
import path from "path";
import FastGlob = require("fast-glob");
import path = require("path");
export namespace Files {
export function TestFolder(): string {
return __dirname;
}
export function TestFolder(): string {
return path.join(__dirname, "..", "..", "test");
}
export function FilesFolder(): string {
return path.join(TestFolder(), "files");
}
export function RootFolder(): string {
return path.join(TestFolder(), "..");
}
export function FilesFolder(): string {
return path.join(TestFolder(), "files");
}
export function CorrectFilesFolder(): string {
return path.join(FilesFolder(), "correct");
}
export function InCorrectFilesFolder(): string {
return path.join(FilesFolder(), "incorrect");
}
export function GetFiles(folder: string): string[] {
return FastGlob.sync(folder, { absolute: true, onlyFiles: true });
}
}