Fix testing output
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'bun:test';
|
||||
import { solveFirst, solveSecond } from './index.ts';
|
||||
import { solveFirst } from './index.ts';
|
||||
|
||||
describe('2023-25', () => {
|
||||
it('first', () => {
|
||||
@@ -18,10 +18,4 @@ rzs: qnr cmg lsr rsh
|
||||
frs: qnr lhk lsr`;
|
||||
expect(solveFirst(testInput)).toBe(54);
|
||||
});
|
||||
it('second', () => {
|
||||
// TODO: add second input
|
||||
const testInput = ``;
|
||||
// TODO: add second solution
|
||||
expect(solveSecond(testInput)).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
+4
-8
@@ -73,13 +73,9 @@ export function solveFirst(input: string): number {
|
||||
mult = result.mult;
|
||||
} while (edgeLength > 3);
|
||||
|
||||
console.log(`That took ${i} tries`);
|
||||
console.log(mult);
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.log(`That took ${i} tries`);
|
||||
console.log(mult);
|
||||
}
|
||||
return mult;
|
||||
}
|
||||
|
||||
export function solveSecond(input: string): number {
|
||||
// TODO: add code
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-5
@@ -1,12 +1,8 @@
|
||||
import { join } from 'path';
|
||||
import { solveFirst, solveSecond } from './index.ts';
|
||||
import { solveFirst } from './index.ts';
|
||||
|
||||
const input = await Bun.file(join(__dirname, 'input.txt')).text();
|
||||
|
||||
const firstAnswer = solveFirst(input);
|
||||
|
||||
console.log(firstAnswer);
|
||||
|
||||
const secondAnswer = solveSecond(input);
|
||||
|
||||
console.log(secondAnswer);
|
||||
|
||||
Reference in New Issue
Block a user