Download test/ConfigLoader.test.js from Brister/skribd: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/spaces/Brister/skribd/resolve/main/test/ConfigLoader.test.js
- Command line
-
hf download hf://spaces/Brister/skribd/test/ConfigLoader.test.js
-
curl -L -o ConfigLoader.test.js https://huggingface.co/spaces/Brister/skribd/resolve/main/test/ConfigLoader.test.js
565 Bytes
| import { configLoader } from "../src/utils/io/ConfigLoader.js"; | |
| describe("load", () => { | |
| test("return 'output' if load DIRECTORY.output", () => { | |
| expect(configLoader.load("DIRECTORY", "output")).toBe("output"); | |
| }) | |
| test("throw an error if load unknown section", () => { | |
| expect(() => { | |
| configLoader.load("FOO", "output") | |
| }).toThrow(TypeError) | |
| }) | |
| test("throw an error if load unknown key", () => { | |
| expect(() => { | |
| configLoader.load("DIRECTORY", "FOO") | |
| }).toThrow(TypeError) | |
| }) | |
| }) |