Spaces:
Paused
Paused
Download console/src/pages/Coding/getLanguage.test.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 691 Bytes
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/pages/Coding/getLanguage.test.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/pages/Coding/getLanguage.test.ts
-
curl -L -o getLanguage.test.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/pages/Coding/getLanguage.test.ts
691 Bytes
| /** | |
| * Tests for the Coding editor's extension → Monaco language mapping. | |
| */ | |
| import { describe, expect, it } from "vitest"; | |
| import { getLanguage } from "./getLanguage"; | |
| describe("getLanguage", () => { | |
| it("maps RobotFramework extensions", () => { | |
| expect(getLanguage("tests/login.robot")).toBe("robotframework"); | |
| expect(getLanguage("resources/common.resource")).toBe("robotframework"); | |
| expect(getLanguage("SUITE.ROBOT")).toBe("robotframework"); | |
| }); | |
| it("keeps existing mappings intact", () => { | |
| expect(getLanguage("main.py")).toBe("python"); | |
| expect(getLanguage("app.tsx")).toBe("typescript"); | |
| expect(getLanguage("unknown.xyz")).toBe("plaintext"); | |
| }); | |
| }); | |