This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/frontend/src/utils/__test__/queue.test.ts
Alexander Polynomdivision 909149fdc7 refactor: MONOREPO
2018-09-20 17:38:12 +02:00

17 lines
370 B
TypeScript

import { Queue } from "../queue";
test("Enqueue a, b and c and dequeue them", () => {
const q: Queue = new Queue<string>();
q.enqueue("a");
q.enqueue("b");
q.enqueue("c");
expect(q.size()).toBe(3);
expect(q.dequeue()).toEqual("a");
expect(q.dequeue()).toEqual("b");
expect(q.dequeue()).toEqual("c");
expect(q.size()).toBe(0);
});