Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 725 Bytes
94753b6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { defineConfig } from "vitest/config";
import { readFileSync } from "node:fs";
import { join } from "node:path";
// make local test files available in browser by preloading their contents
const testFilesToPreload = [
"cheetah.png",
"cats.png",
"sample1.flac",
"invoice.png",
"stormtrooper_depth.png",
"bird_canny.png",
];
const testFilesContents: Record<string, string> = {};
for (const filename of testFilesToPreload) {
testFilesContents[filename] = readFileSync(join(__dirname, "test", filename)).toString("base64");
}
export default defineConfig({
test: {
setupFiles: ["./test/expect-closeto.ts"],
},
envPrefix: ["HF_", "VCR_"],
define: {
__TEST_FILES__: JSON.stringify(testFilesContents),
},
});
|