28 lines
822 B
TypeScript
28 lines
822 B
TypeScript
|
import { readlines } from "../_utils";
|
||
|
|
||
|
const solution = require("./solution");
|
||
|
|
||
|
describe("day 2: rock paper scissors, pt 1", () => {
|
||
|
test("sample input", async () => {
|
||
|
const sample = await readlines("./day_02/sample.txt");
|
||
|
expect(solution.part1_solver(sample)).toBe(15);
|
||
|
});
|
||
|
|
||
|
test("submission input", async () => {
|
||
|
const input = await readlines("./day_02/input.txt");
|
||
|
expect(solution.part1_solver(input)).toBe(13675);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe("day 2: rock paper scissors, pt 2", () => {
|
||
|
test("sample input", async () => {
|
||
|
const sample = await readlines("./day_02/sample.txt");
|
||
|
expect(solution.part2_solver(sample)).toBe(12);
|
||
|
});
|
||
|
|
||
|
test("submission input", async () => {
|
||
|
const input = await readlines("./day_02/input.txt");
|
||
|
expect(solution.part2_solver(input)).toBe(14184);
|
||
|
});
|
||
|
});
|