Spaces:
Sleeping
Sleeping
Download node_modules/entities/src/escape.spec.ts from andy-gg/my-project: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/spaces/andy-gg/my-project/resolve/main/node_modules/entities/src/escape.spec.ts
- Command line
-
hf download hf://spaces/andy-gg/my-project/node_modules/entities/src/escape.spec.ts
-
curl -L -o escape.spec.ts https://huggingface.co/spaces/andy-gg/my-project/resolve/main/node_modules/entities/src/escape.spec.ts
497 Bytes
| import { describe, it, expect } from "vitest"; | |
| import * as entities from "./index.js"; | |
| describe("escape HTML", () => { | |
| it("should escape HTML attribute values", () => | |
| expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( | |
| "<a " attr > & value !", | |
| )); | |
| it("should escape HTML text", () => | |
| expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( | |
| '<a " text > & value !', | |
| )); | |
| }); | |