Files
languageservices/expressions/src/data/dictionary.test.ts
T
Christopher Schleiden 2a3d63551f Rename folders
2023-02-22 15:52:40 -08:00

20 lines
562 B
TypeScript

import {Dictionary} from "./dictionary";
import {StringData} from "./string";
describe("dictionary", () => {
it("pairs contains all values", () => {
const d = new Dictionary();
d.add("ABC", new StringData("val"));
expect(d.pairs()).toEqual([{key: "ABC", value: new StringData("val")}]);
});
it("does not add duplicate entries", () => {
const d = new Dictionary();
d.add("ABC", new StringData("val1"));
d.add("abc", new StringData("val2"));
expect(d.pairs()).toEqual([{key: "ABC", value: new StringData("val1")}]);
});
});