Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("hasInstance", () => {
expect(ReadonlyCollection.hasInstance([])).toBe(true);
});
it("size", () => {
it("hasInstance", () => {
expect(ReadonlyCollection.hasInstance(new TypedArray())).toBe(true);
});
it("size", () => {
it("hasInstance", () => {
expect(ReadonlyCollection.hasInstance(new Set())).toBe(true);
});
it("size", () => {
it("add", () => {
const obj = new Set(["a"]);
obj[Collection.add]("b");
expect([...obj]).toEqual(["a", "b"]);
});
it("delete", () => {
it("add", () => {
const obj = ["a"];
obj[Collection.add]("b");
expect(obj).toEqual(["a", "b"]);
});
it("delete", () => {
it("clear", () => {
const obj = ["a", "b"];
obj[Collection.clear]();
expect(obj).toEqual([]);
});
});
it("clear", () => {
const obj = new Set(["a", "b"]);
obj[Collection.clear]();
expect([...obj]).toEqual([]);
});
});
it("delete", () => {
const obj = new Set(["a", "b"]);
expect(obj[Collection.delete]("b")).toBe(true);
expect([...obj]).toEqual(["a"]);
});
it("clear", () => {
it("delete", () => {
const obj = ["a", "b"];
expect(obj[Collection.delete]("b")).toBe(true);
expect(obj).toEqual(["a"]);
});
it("clear", () => {
it("hasInstance", () => {
expect(Collection.hasInstance([])).toBe(true);
});
it("add", () => {