-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
56 changed files
with
439 additions
and
2,312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v22 | ||
v23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { part1, part2 } from '.'; | ||
import assert from 'node:assert/strict'; | ||
import { describe, it } from 'node:test'; | ||
import { part1, part2 } from './index.ts'; | ||
|
||
const input = '1113122113'; | ||
|
||
describe('Day 10', () => { | ||
describe('Part 1', () => { | ||
it('should process 40 iterations', () => { | ||
expect.assertions(1); | ||
|
||
expect(part1(input)).toStrictEqual(360154); | ||
assert.strictEqual(part1(input), 360154); | ||
}); | ||
}); | ||
|
||
describe('Part 2', () => { | ||
it('should process 50 iterations', () => { | ||
expect.assertions(1); | ||
|
||
expect(part2(input)).toStrictEqual(5103798); | ||
assert.strictEqual(part2(input), 5103798); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import assert from 'node:assert/strict'; | ||
import { readFile } from 'node:fs/promises'; | ||
import { describe, expect, it } from 'vitest'; | ||
import { part1 } from '.'; | ||
import { describe, it } from 'node:test'; | ||
import { part1 } from './index.ts'; | ||
|
||
const input = await readFile(`${__dirname}/input`, 'utf-8'); | ||
const input = await readFile(`${import.meta.dirname}/input`, 'utf-8'); | ||
|
||
describe('Day 12', () => { | ||
describe('Part 1', () => { | ||
it('should sum up app numbers in JSON object', () => { | ||
expect.assertions(1); | ||
|
||
expect(part1(input)).toStrictEqual(119433); | ||
assert.strictEqual(part1(input), 119433); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import assert from 'node:assert/strict'; | ||
import { readFile } from 'node:fs/promises'; | ||
import { describe, expect, it } from 'vitest'; | ||
import { part1 } from '.'; | ||
import { describe, it } from 'node:test'; | ||
import { part1 } from './index.ts'; | ||
|
||
const input = (await readFile(`${__dirname}/input`, 'utf-8')).split('\n'); | ||
const input = (await readFile(`${import.meta.dirname}/input`, 'utf-8')).split('\n'); | ||
|
||
describe('Day 14', () => { | ||
describe('Part 1', () => { | ||
it('should return the max distance', () => { | ||
expect.assertions(1); | ||
|
||
expect(part1(input)).toStrictEqual(2660); | ||
assert.strictEqual(part1(input), 2660); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { part1 } from '.'; | ||
import assert from 'node:assert/strict'; | ||
import { describe, it } from 'node:test'; | ||
import { part1 } from './index.ts'; | ||
|
||
describe('Day 15', () => { | ||
describe('Part 1', () => { | ||
it('should', () => { | ||
expect.assertions(1); | ||
|
||
expect(part1()).toStrictEqual(0); | ||
assert.strictEqual(part1(), 0); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import assert from 'node:assert/strict'; | ||
import { readFile } from 'node:fs/promises'; | ||
import { describe, expect, it } from 'vitest'; | ||
import { part1 } from '.'; | ||
import { describe, it } from 'node:test'; | ||
import { part1 } from './index.ts'; | ||
|
||
const input = (await readFile(`${__dirname}/input`, 'utf-8')).split('\n'); | ||
const input = (await readFile(`${import.meta.dirname}/input`, 'utf-8')).split('\n'); | ||
|
||
describe('Day 16', () => { | ||
describe('Part 1', () => { | ||
it('should find the number of the Sue that got you the gift ', () => { | ||
expect.assertions(1); | ||
|
||
expect(part1(input)).toStrictEqual(373); | ||
assert.strictEqual(part1(input), 373); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.