test: set up and tear down test dir

This commit is contained in:
tomasz-io 2024-11-05 11:12:21 +07:00
parent 4482ca1ac0
commit 9404ba5171

View file

@ -3,6 +3,7 @@ import {
testAutocompleteFiltering,
} from "./util";
import { TEST_CASES } from "./testCases";
import { setUpTestDir, tearDownTestDir } from "../../../test/util/testDir";
const filterTestCases = (tests: AutocompleteFileringTestInput[]) => {
if (tests.some((test) => test.options?.only)) {
@ -13,6 +14,15 @@ const filterTestCases = (tests: AutocompleteFileringTestInput[]) => {
};
describe("llms/Mock", () => {
beforeAll(async () => {
tearDownTestDir();
setUpTestDir();
});
afterAll(async () => {
tearDownTestDir();
});
describe("Autocomplete Filtering Tests", () => {
beforeEach(async () => {
await new Promise((resolve) => setTimeout(resolve, 50));