adventofcode/2023/01/benchmark.test.js

14 lines
370 B
JavaScript
Raw Permalink Normal View History

2023-12-01 20:59:04 +00:00
import { bench, expect } from 'vitest';
import { readFileSync } from 'fs-extra';
import { parse } from 'yaml';
import { solution_1 } from './part1.js';
const input = readFileSync('./input',{ encoding: 'utf8'});
const solutions = parse( readFileSync('./solutions.yml',{encoding:'utf8'}));
bench( 'part 1', () => {
expect(solution_1(input)).toBe(solutions[1])
});