Trying to fix the pipeline (#161)

* Trying to fix the pipeline

* Fixing pipeline

* Removed mocha-junit-reporter
This commit is contained in:
Daan Verstraten
2023-02-21 19:21:04 +01:00
committed by GitHub
parent 731fcdf3a1
commit 92ad45e510
8 changed files with 12 additions and 167 deletions

View File

@@ -18,6 +18,6 @@ describe("Files", function () {
});
it("Random", function () {
expect(Files.TestFolder()).to.equal(DummyFiles.TestFolder());
expect(Files.TestFolder()).to.contain("minecraft-bedrock-schemas");
});
});

View File

@@ -3,7 +3,7 @@ import path = require("path");
export namespace Files {
export function TestFolder(): string {
return path.join(__dirname, "..", "..", "..", "test");
return path.join(__dirname, "..", "..", "test");
}
export function RootFolder(): string {
@@ -22,11 +22,14 @@ export namespace Files {
return path.join(FilesFolder(), "incorrect");
}
export function GetFiles(folder: string): string[] {
if (!folder.endsWith("\\")) folder += "\\";
export function GetFiles(cwd: string): string[] {
if (!cwd.endsWith("/") && !cwd.endsWith("\\")) cwd += "/";
folder = folder.replace("\\", "/");
cwd = cwd.replace("\\", "/");
return FastGlob.sync(["*.json", "**/*.json"], { absolute: true, onlyFiles: true, cwd: folder });
const options: FastGlob.Options = { onlyFiles: true, absolute: true, cwd: cwd };
let entries = FastGlob.sync(["*.json", "**/*.json"], options);
return entries;
}
}