Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"files": {
"includes": [
"src/**",
"test/**",
"tests/**",
"*.json",
"jest.config.ts",
"!src/api.ts",
Expand Down Expand Up @@ -128,7 +128,17 @@
"attributePosition": "auto",
"bracketSpacing": true
},
"globals": []
"globals": [
"afterEach",
"afterAll",
"beforeEach",
"beforeAll",
"describe",
"expect",
"it",
"test",
"jest"
]
},
"assist": {
"enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions tests/cli.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Command } from "commander";

import { buildCmd } from "../src/cli";
import { executeTests } from "../src/tools";
import { runDebugtopus } from "../src/debugtopus";
import { loadConfig } from "../src/config";
import { runDebugtopus } from "../src/debugtopus";
import { executeTests } from "../src/tools";

jest.mock("../src/tools");
jest.mock("../src/debugtopus");
Expand Down Expand Up @@ -173,5 +174,4 @@ describe("config overwrite behaviour", () => {
}),
);
});

});
10 changes: 5 additions & 5 deletions tests/completion.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { log, TabtabEnv } from "tabtab";

import {
CompletableCommand,
environmentIdCompleter,
optionsCompleter,
testCaseIdCompleter,
testReportIdCompleter,
testTargetIdCompleter,
CompletableCommand,
} from "../src/completion";

import { TabtabEnv, log } from "tabtab";
import { getTestTargets } from "../src/tools/test-targets";
import { getEnvironments } from "../src/tools/environments";
import { loadConfig } from "../src/config";
import { getEnvironments } from "../src/tools/environments";
import { getTestCases } from "../src/tools/test-cases";
import { getTestReports } from "../src/tools/test-reports";
import { getTestTargets } from "../src/tools/test-targets";

jest.mock("../src/tools/test-targets");
jest.mock("tabtab");
Expand Down
11 changes: 6 additions & 5 deletions tests/config.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import fs from "fs/promises";
import path from "path";
import { loadConfig, Config, resetConfig } from "../src/config";
import { homedir } from "os";
import path from "path";

import { Config, loadConfig, resetConfig } from "../src/config";

jest.mock("fs/promises");
const mockedFs = fs as jest.Mocked<typeof fs>;

Expand Down Expand Up @@ -34,12 +36,11 @@ describe("Config", () => {

expect(result).toEqual(mockConfig);
expect(mockedFs.readFile).toHaveBeenCalledWith(
path.join(homedir(), ".config", configFileName),
"utf8",
path.join(homedir(), ".config", configFileName),
"utf8",
);
});


it("should load and parse a valid config file", async () => {
const mockConfig: Config = {
apiKey: "test-api-key-12345",
Expand Down
Loading