From 160dc4c345237b1288dffb2dd4b9cec12bd3c811 Mon Sep 17 00:00:00 2001 From: AlexAegis Date: Sun, 17 Sep 2023 13:13:26 +0200 Subject: [PATCH] chore: change some assertions to make it bun compatible, might not be necessary as bun evolves --- .../typescript/tests/part_one.spec.ts.tpl | 4 +- .../typescript/tests/part_two.spec.ts.tpl | 4 +- solutions/typescript/2015/01/src/p1.spec.ts | 20 ++--- solutions/typescript/2015/01/src/p2.spec.ts | 6 +- solutions/typescript/2015/02/src/p1.spec.ts | 6 +- solutions/typescript/2015/02/src/p2.spec.ts | 6 +- solutions/typescript/2015/03/src/p1.spec.ts | 8 +- solutions/typescript/2015/03/src/p2.spec.ts | 8 +- solutions/typescript/2015/04/src/p1.spec.ts | 6 +- solutions/typescript/2015/04/src/p2.spec.ts | 6 +- solutions/typescript/2015/05/src/p1.spec.ts | 12 +-- solutions/typescript/2015/05/src/p2.spec.ts | 10 +-- solutions/typescript/2016/01/src/p1.spec.ts | 8 +- solutions/typescript/2016/01/src/p2.spec.ts | 4 +- solutions/typescript/2016/02/src/p1.spec.ts | 4 +- solutions/typescript/2016/02/src/p2.spec.ts | 4 +- solutions/typescript/2016/03/src/p1.spec.ts | 2 +- solutions/typescript/2016/03/src/p2.spec.ts | 2 +- solutions/typescript/2017/01/src/p1.spec.ts | 10 +-- solutions/typescript/2017/01/src/p2.spec.ts | 12 +-- solutions/typescript/2017/02/src/p1.spec.ts | 6 +- solutions/typescript/2017/02/src/p2.spec.ts | 4 +- solutions/typescript/2018/01/src/p1.spec.ts | 4 +- solutions/typescript/2018/01/src/p2.spec.ts | 4 +- solutions/typescript/2018/02/src/p1.spec.ts | 4 +- solutions/typescript/2018/02/src/p2.spec.ts | 4 +- solutions/typescript/2018/03/src/p1.spec.ts | 4 +- solutions/typescript/2018/03/src/p2.spec.ts | 4 +- solutions/typescript/2018/04/src/p1.spec.ts | 4 +- solutions/typescript/2018/04/src/p2.spec.ts | 4 +- solutions/typescript/2018/05/src/p1.spec.ts | 4 +- solutions/typescript/2018/05/src/p2.spec.ts | 4 +- .../2018/06/src/model/coord.class.spec.ts | 8 +- solutions/typescript/2018/06/src/p1.spec.ts | 4 +- solutions/typescript/2018/06/src/p2.spec.ts | 4 +- solutions/typescript/2018/07/src/p1.spec.ts | 4 +- solutions/typescript/2018/07/src/p2.spec.ts | 16 ++-- solutions/typescript/2018/08/src/p1.spec.ts | 4 +- solutions/typescript/2018/08/src/p2.spec.ts | 4 +- solutions/typescript/2018/09/src/p1.spec.ts | 14 ++-- solutions/typescript/2018/09/src/p2.spec.ts | 2 +- solutions/typescript/2018/10/src/p1.spec.ts | 4 +- solutions/typescript/2018/10/src/p2.spec.ts | 4 +- .../11/src/functions/ripple.function.spec.ts | 2 +- solutions/typescript/2018/11/src/p1.spec.ts | 4 +- solutions/typescript/2018/11/src/p2.spec.ts | 2 +- .../2018/12/src/model/cave.class.spec.ts | 6 +- solutions/typescript/2018/12/src/p1.spec.ts | 4 +- solutions/typescript/2018/12/src/p2.spec.ts | 4 +- solutions/typescript/2018/13/src/p1.spec.ts | 6 +- solutions/typescript/2018/13/src/p2.spec.ts | 6 +- solutions/typescript/2018/14/src/p1.spec.ts | 10 +-- solutions/typescript/2018/14/src/p2.spec.ts | 18 ++--- solutions/typescript/2019/01/src/p1.spec.ts | 10 +-- solutions/typescript/2019/01/src/p2.spec.ts | 8 +- solutions/typescript/2019/02/src/p1.spec.ts | 12 +-- solutions/typescript/2019/02/src/p2.spec.ts | 2 +- solutions/typescript/2019/03/src/p1.spec.ts | 8 +- solutions/typescript/2019/03/src/p2.spec.ts | 8 +- solutions/typescript/2019/04/src/p1.spec.ts | 8 +- solutions/typescript/2019/04/src/p2.spec.ts | 8 +- solutions/typescript/2019/05/src/p1.spec.ts | 4 +- solutions/typescript/2019/05/src/p2.spec.ts | 58 +++++++------- solutions/typescript/2019/06/src/p1.spec.ts | 4 +- solutions/typescript/2019/06/src/p2.spec.ts | 8 +- solutions/typescript/2019/07/src/p1.spec.ts | 8 +- solutions/typescript/2019/07/src/p2.spec.ts | 6 +- solutions/typescript/2019/08/src/p1.spec.ts | 2 +- solutions/typescript/2019/08/src/p2.spec.ts | 2 +- solutions/typescript/2019/09/src/p1.spec.ts | 8 +- solutions/typescript/2019/09/src/p2.spec.ts | 2 +- solutions/typescript/2019/10/src/p1.spec.ts | 12 +-- solutions/typescript/2019/10/src/p2.spec.ts | 2 +- solutions/typescript/2019/11/src/p1.spec.ts | 2 +- solutions/typescript/2019/11/src/p2.spec.ts | 2 +- solutions/typescript/2019/12/src/p1.spec.ts | 6 +- solutions/typescript/2019/12/src/p2.spec.ts | 6 +- solutions/typescript/2019/13/src/p1.spec.ts | 2 +- solutions/typescript/2019/13/src/p2.spec.ts | 2 +- solutions/typescript/2019/14/src/p1.spec.ts | 4 +- solutions/typescript/2019/14/src/p2.spec.ts | 4 +- solutions/typescript/2019/16/src/p1.spec.ts | 2 +- solutions/typescript/2019/16/src/p2.spec.ts | 2 +- solutions/typescript/2019/17/src/p1.spec.ts | 2 +- solutions/typescript/2019/17/src/p2.spec.ts | 2 +- solutions/typescript/2019/18/src/p1.spec.ts | 4 +- solutions/typescript/2019/18/src/p2.spec.ts | 4 +- solutions/typescript/2019/19/src/p1.spec.ts | 2 +- solutions/typescript/2019/19/src/p2.spec.ts | 2 +- solutions/typescript/2019/20/src/p1.spec.ts | 4 +- solutions/typescript/2019/20/src/p2.spec.ts | 4 +- solutions/typescript/2019/21/src/p1.spec.ts | 2 +- solutions/typescript/2019/21/src/p2.spec.ts | 2 +- solutions/typescript/2019/22/src/p1.spec.ts | 10 +-- solutions/typescript/2019/22/src/p2.spec.ts | 10 +-- solutions/typescript/2019/23/src/p1.spec.ts | 2 +- solutions/typescript/2019/23/src/p2.spec.ts | 2 +- solutions/typescript/2019/24/src/p1.spec.ts | 4 +- solutions/typescript/2019/24/src/p2.spec.ts | 4 +- solutions/typescript/2020/01/src/p1.spec.ts | 4 +- solutions/typescript/2020/01/src/p2.spec.ts | 4 +- solutions/typescript/2020/02/src/p1.spec.ts | 4 +- solutions/typescript/2020/02/src/p2.spec.ts | 4 +- solutions/typescript/2020/03/src/p1.spec.ts | 4 +- solutions/typescript/2020/03/src/p2.spec.ts | 4 +- solutions/typescript/2020/04/src/p1.spec.ts | 6 +- solutions/typescript/2020/04/src/p2.spec.ts | 32 ++++---- .../typescript/2020/05/src/p1.binary.spec.ts | 10 +-- .../typescript/2020/05/src/p1.class.spec.ts | 10 +-- solutions/typescript/2020/05/src/p1.spec.ts | 10 +-- solutions/typescript/2020/05/src/p2.spec.ts | 2 +- solutions/typescript/2020/06/src/p1.spec.ts | 4 +- solutions/typescript/2020/06/src/p2.spec.ts | 4 +- solutions/typescript/2020/07/src/p1.spec.ts | 6 +- solutions/typescript/2020/07/src/p2.spec.ts | 6 +- solutions/typescript/2020/09/src/p1.spec.ts | 12 +-- solutions/typescript/2020/09/src/p2.spec.ts | 4 +- solutions/typescript/2020/10/src/p1.spec.ts | 6 +- .../2020/10/src/p2.memoized.spec.ts | 6 +- solutions/typescript/2020/10/src/p2.spec.ts | 6 +- solutions/typescript/2020/11/src/p1.spec.ts | 4 +- solutions/typescript/2020/11/src/p2.spec.ts | 4 +- solutions/typescript/2020/12/src/p1.spec.ts | 4 +- solutions/typescript/2020/12/src/p2.spec.ts | 4 +- solutions/typescript/2020/13/src/p1.spec.ts | 4 +- solutions/typescript/2020/13/src/p2.spec.ts | 14 ++-- solutions/typescript/2020/14/src/p1.spec.ts | 4 +- solutions/typescript/2020/14/src/p2.spec.ts | 4 +- solutions/typescript/2020/15/src/p1.spec.ts | 16 ++-- solutions/typescript/2020/15/src/p2.spec.ts | 16 ++-- solutions/typescript/2020/16/src/p1.spec.ts | 4 +- solutions/typescript/2020/16/src/p2.spec.ts | 4 +- solutions/typescript/2020/17/src/p1.spec.ts | 4 +- solutions/typescript/2020/17/src/p2.spec.ts | 4 +- solutions/typescript/2020/18/src/p1.spec.ts | 14 ++-- solutions/typescript/2020/18/src/p2.spec.ts | 14 ++-- solutions/typescript/2020/19/src/p1.spec.ts | 8 +- solutions/typescript/2020/19/src/p2.spec.ts | 4 +- solutions/typescript/2020/20/src/p1.spec.ts | 4 +- solutions/typescript/2020/20/src/p2.spec.ts | 4 +- solutions/typescript/2020/21/src/p1.spec.ts | 4 +- solutions/typescript/2020/21/src/p2.spec.ts | 4 +- solutions/typescript/2020/22/src/p1.spec.ts | 4 +- solutions/typescript/2020/22/src/p2.spec.ts | 6 +- solutions/typescript/2020/23/src/p1.spec.ts | 12 +-- solutions/typescript/2020/23/src/p2.spec.ts | 4 +- solutions/typescript/2020/24/src/p1.spec.ts | 8 +- solutions/typescript/2020/24/src/p2.spec.ts | 4 +- solutions/typescript/2020/25/src/p1.spec.ts | 4 +- solutions/typescript/2020/25/src/p2.spec.ts | 4 +- solutions/typescript/2021/01/src/p1.spec.ts | 4 +- solutions/typescript/2021/01/src/p2.spec.ts | 4 +- solutions/typescript/2021/02/src/p1.spec.ts | 4 +- solutions/typescript/2021/02/src/p2.spec.ts | 4 +- solutions/typescript/2021/03/src/p1.spec.ts | 4 +- solutions/typescript/2021/03/src/p2.spec.ts | 4 +- solutions/typescript/2021/04/src/p1.spec.ts | 4 +- solutions/typescript/2021/04/src/p2.spec.ts | 4 +- solutions/typescript/2021/05/src/p1.spec.ts | 4 +- solutions/typescript/2021/05/src/p2.spec.ts | 4 +- solutions/typescript/2021/06/src/p1.spec.ts | 6 +- solutions/typescript/2021/06/src/p2.spec.ts | 4 +- solutions/typescript/2021/07/src/p1.spec.ts | 4 +- solutions/typescript/2021/07/src/p2.spec.ts | 4 +- solutions/typescript/2021/08/src/p1.spec.ts | 6 +- solutions/typescript/2021/08/src/p2.spec.ts | 6 +- solutions/typescript/2021/09/src/p1.spec.ts | 4 +- solutions/typescript/2021/09/src/p2.spec.ts | 4 +- solutions/typescript/2021/10/src/p1.spec.ts | 4 +- solutions/typescript/2021/10/src/p2.spec.ts | 4 +- solutions/typescript/2021/11/src/p1.spec.ts | 4 +- solutions/typescript/2021/11/src/p2.spec.ts | 4 +- solutions/typescript/2021/12/src/p1.spec.ts | 8 +- solutions/typescript/2021/12/src/p2.spec.ts | 8 +- solutions/typescript/2021/13/src/p1.spec.ts | 4 +- solutions/typescript/2021/13/src/p2.spec.ts | 4 +- solutions/typescript/2021/14/src/p1.spec.ts | 4 +- solutions/typescript/2021/14/src/p2.spec.ts | 4 +- solutions/typescript/2021/15/src/p1.spec.ts | 4 +- solutions/typescript/2021/15/src/p2.spec.ts | 4 +- solutions/typescript/2021/16/src/p1.spec.ts | 32 ++++---- solutions/typescript/2021/16/src/p2.spec.ts | 32 ++++---- solutions/typescript/2021/17/src/p1.spec.ts | 4 +- solutions/typescript/2021/17/src/p2.spec.ts | 4 +- .../18/src/model/snailfish-number.spec.ts | 70 ++++++++-------- solutions/typescript/2021/18/src/p1.spec.ts | 4 +- solutions/typescript/2021/18/src/p2.spec.ts | 4 +- .../21/src/model/snailfish-number.spec.ts | 80 +++++++++---------- solutions/typescript/2021/21/src/p1.spec.ts | 4 +- solutions/typescript/2021/21/src/p2.spec.ts | 4 +- solutions/typescript/2022/01/src/p1.spec.ts | 4 +- solutions/typescript/2022/01/src/p2.spec.ts | 4 +- solutions/typescript/2022/02/src/p1.spec.ts | 6 +- solutions/typescript/2022/02/src/p2.spec.ts | 6 +- solutions/typescript/2022/03/src/p1.spec.ts | 4 +- solutions/typescript/2022/03/src/p2.spec.ts | 4 +- solutions/typescript/2022/04/src/p1.spec.ts | 20 ++--- solutions/typescript/2022/04/src/p2.spec.ts | 4 +- solutions/typescript/2022/05/src/p1.spec.ts | 4 +- solutions/typescript/2022/05/src/p2.spec.ts | 4 +- solutions/typescript/2022/06/src/p1.spec.ts | 12 +-- solutions/typescript/2022/06/src/p2.spec.ts | 12 +-- solutions/typescript/2022/07/src/p1.spec.ts | 4 +- solutions/typescript/2022/07/src/p2.spec.ts | 4 +- solutions/typescript/2022/08/src/p1.spec.ts | 4 +- solutions/typescript/2022/08/src/p2.spec.ts | 4 +- solutions/typescript/2022/09/src/p1.spec.ts | 6 +- solutions/typescript/2022/09/src/p2.spec.ts | 6 +- solutions/typescript/2022/10/src/p1.spec.ts | 6 +- solutions/typescript/2022/10/src/p2.spec.ts | 4 +- solutions/typescript/2022/11/src/p1.spec.ts | 4 +- solutions/typescript/2022/11/src/p2.spec.ts | 4 +- solutions/typescript/2022/12/src/p1.spec.ts | 4 +- solutions/typescript/2022/12/src/p2.spec.ts | 4 +- solutions/typescript/2022/13/src/p1.spec.ts | 4 +- solutions/typescript/2022/13/src/p2.spec.ts | 4 +- solutions/typescript/2022/14/src/p1.spec.ts | 4 +- solutions/typescript/2022/14/src/p2.spec.ts | 4 +- solutions/typescript/2022/15/src/p1.spec.ts | 4 +- solutions/typescript/2022/15/src/p2.spec.ts | 4 +- solutions/typescript/2022/16/src/p1.spec.ts | 4 +- solutions/typescript/2022/16/src/p2.spec.ts | 4 +- solutions/typescript/2022/17/src/p1.spec.ts | 4 +- solutions/typescript/2022/17/src/p2.spec.ts | 4 +- solutions/typescript/2022/18/src/p1.spec.ts | 4 +- solutions/typescript/2022/18/src/p2.spec.ts | 4 +- solutions/typescript/2022/19/src/p1.spec.ts | 4 +- solutions/typescript/2022/19/src/p2.spec.ts | 4 +- solutions/typescript/2022/20/src/p1.spec.ts | 4 +- solutions/typescript/2022/20/src/p2.spec.ts | 4 +- solutions/typescript/2022/21/src/p1.spec.ts | 4 +- solutions/typescript/2022/21/src/p2.spec.ts | 4 +- solutions/typescript/2022/22/src/p1.spec.ts | 4 +- solutions/typescript/2022/22/src/p2.spec.ts | 4 +- solutions/typescript/2022/23/src/p1.spec.ts | 4 +- solutions/typescript/2022/23/src/p2.spec.ts | 4 +- solutions/typescript/2022/24/src/p1.spec.ts | 4 +- solutions/typescript/2022/24/src/p2.spec.ts | 4 +- solutions/typescript/2022/25/src/p1.spec.ts | 4 +- solutions/typescript/2022/25/src/p2.spec.ts | 4 +- solutions/typescript/2023/01/src/p1.spec.ts | 4 +- solutions/typescript/2023/01/src/p2.spec.ts | 4 +- .../src/array/cut-subsegment.function.spec.ts | 8 +- .../array/find-end-of-pair.function.spec.ts | 6 +- .../src/array/flip-matrix.function.spec.ts | 10 +-- .../groups/slide-window.function.spec.ts | 2 +- .../libs/lib/src/array/mean.function.spec.ts | 6 +- .../lib/src/array/median.function.spec.ts | 4 +- .../libs/lib/src/array/peek.function.spec.ts | 4 +- .../src/array/rotate-matrix.function.spec.ts | 14 ++-- ...eate-tile-matrix-from-map.function.spec.ts | 2 +- .../functions/find-corners.function.spec.ts | 8 +- .../generate-string-tile.function.spec.ts | 2 +- .../src/functions/identity.function.spec.ts | 22 +---- .../functions/integer-length.function.spec.ts | 24 +++--- .../src/functions/memoize.function.spec.ts | 6 +- .../merge-tile-matrix.function.spec.ts | 2 +- .../functions/non-nullish.function.spec.ts | 17 +--- .../lib/src/functions/num-at.function.spec.ts | 20 ++--- .../src/functions/num-start.function.spec.ts | 22 ++--- .../common/add-within-range.function.spec.ts | 4 +- .../src/math/common/clamp.function.spec.ts | 2 +- .../math/common/divisible.function.spec.ts | 4 +- .../lib/src/math/common/egcd.function.spec.ts | 6 +- .../lib/src/math/common/gcd.function.spec.ts | 6 +- .../lib/src/math/common/lcm.function.spec.ts | 4 +- .../src/math/common/lerp1d.function.spec.ts | 4 +- .../discrete/inverse-modulo.function.spec.ts | 12 +-- .../modular-exponentiation.function.spec.ts | 8 +- .../discrete/positive-modulo.function.spec.ts | 8 +- .../geometry/manhattan-circle.class.spec.ts | 4 +- .../lib/src/model/direction.class.spec.ts | 32 ++++---- .../src/model/graph/grid-graph.class.spec.ts | 10 +-- .../src/model/tree/pair-tree.class.spec.ts | 20 ++--- .../src/set/add-all-to-set.function.spec.ts | 2 +- .../src/string/right-split.function.spec.ts | 8 +- .../string/string-to-matrix.function.spec.ts | 2 +- .../string-to-vectormap.function.spec.ts | 2 +- .../vectors-in-string-tile.function.spec.ts | 8 +- 279 files changed, 923 insertions(+), 958 deletions(-) diff --git a/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_one.spec.ts.tpl b/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_one.spec.ts.tpl index 1c7ca320a..f6c84c070 100644 --- a/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_one.spec.ts.tpl +++ b/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_one.spec.ts.tpl @@ -9,10 +9,10 @@ import { runner } from '../part_one'; describe(`${year} - Day ${day} - Part One`, () => { it(`should resolve to ${results.one.input} when using the input`, async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(runner(input.input)).to.equal(Infinity); + expect(runner(input.input)).toEqual(Infinity); }); it('should be that that both the first examples resolves to 0', async () => { - expect(await runner('')).to.equal(0); + expect(await runner('')).toEqual(0); }); }); diff --git a/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_two.spec.ts.tpl b/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_two.spec.ts.tpl index b06f1aa7b..417c36c1f 100644 --- a/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_two.spec.ts.tpl +++ b/.templates/solution/{{year}}/day{{day}}/typescript/tests/part_two.spec.ts.tpl @@ -9,10 +9,10 @@ import { runner } from '../part_two'; describe('${year} - Day ${day} - Part Two', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(runner(input.input)).to.equal(Infinity); + expect(runner(input.input)).toEqual(Infinity); }); it('should be that that the first example resolves to 0', async () => { - expect(await runner('0')).to.equal(0); + expect(await runner('0')).toEqual(0); }); }); diff --git a/solutions/typescript/2015/01/src/p1.spec.ts b/solutions/typescript/2015/01/src/p1.spec.ts index d4df9a07b..0dbc8239c 100644 --- a/solutions/typescript/2015/01/src/p1.spec.ts +++ b/solutions/typescript/2015/01/src/p1.spec.ts @@ -6,27 +6,27 @@ import { p1 } from './p1.js'; describe('2015 - Day 1 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(74); + expect(p1(resources.input)).toEqual(74); }); it('should be that that both the first examples resolves to 0', () => { - expect(p1('(())')).to.equal(0); - expect(p1('()()')).to.equal(0); + expect(p1('(())')).toEqual(0); + expect(p1('()()')).toEqual(0); }); it('should be that that both the second and the third examples resolves to 3', () => { - expect(p1('(((')).to.equal(3); - expect(p1('(()(()(')).to.equal(3); - expect(p1('))(((((')).to.equal(3); + expect(p1('(((')).toEqual(3); + expect(p1('(()(()(')).toEqual(3); + expect(p1('))(((((')).toEqual(3); }); it('should be that that both the fourth examples resolves to -1', () => { - expect(p1('())')).to.equal(-1); - expect(p1('))(')).to.equal(-1); + expect(p1('())')).toEqual(-1); + expect(p1('))(')).toEqual(-1); }); it('should be that that both the fith examples resolves to -3', () => { - expect(p1(')))')).to.equal(-3); - expect(p1(')())())')).to.equal(-3); + expect(p1(')))')).toEqual(-3); + expect(p1(')())())')).toEqual(-3); }); }); diff --git a/solutions/typescript/2015/01/src/p2.spec.ts b/solutions/typescript/2015/01/src/p2.spec.ts index 0e4d32574..a6f80b076 100644 --- a/solutions/typescript/2015/01/src/p2.spec.ts +++ b/solutions/typescript/2015/01/src/p2.spec.ts @@ -6,14 +6,14 @@ import { p2 } from './p2.js'; describe('2015 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1795); + expect(p2(resources.input)).toEqual(1795); }); it('should be that that the first example resolves to 1', () => { - expect(p2(')')).to.equal(1); + expect(p2(')')).toEqual(1); }); it('should be that that the second example resolves to 5', () => { - expect(p2('()())')).to.equal(5); + expect(p2('()())')).toEqual(5); }); }); diff --git a/solutions/typescript/2015/02/src/p1.spec.ts b/solutions/typescript/2015/02/src/p1.spec.ts index 09df68038..c5d77aa14 100644 --- a/solutions/typescript/2015/02/src/p1.spec.ts +++ b/solutions/typescript/2015/02/src/p1.spec.ts @@ -6,14 +6,14 @@ import { p1 } from './p1.js'; describe('2015 - Day 2 - Part One', () => { it('should resolve to 1606483 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1_606_483); + expect(p1(resources.input)).toEqual(1_606_483); }); it('should be that that the first example resolves to 58', () => { - expect(p1('2x3x4')).to.equal(58); + expect(p1('2x3x4')).toEqual(58); }); it('should be that that the second example resolves to 43', () => { - expect(p1('1x1x10')).to.equal(43); + expect(p1('1x1x10')).toEqual(43); }); }); diff --git a/solutions/typescript/2015/02/src/p2.spec.ts b/solutions/typescript/2015/02/src/p2.spec.ts index 7a3b2bdef..f5c1d3cbb 100644 --- a/solutions/typescript/2015/02/src/p2.spec.ts +++ b/solutions/typescript/2015/02/src/p2.spec.ts @@ -6,14 +6,14 @@ import { p2 } from './p2.js'; describe('2015 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(3_842_356); + expect(p2(resources.input)).toEqual(3_842_356); }); it('should be that that the first example resolves to 34', () => { - expect(p2('2x3x4')).to.equal(34); + expect(p2('2x3x4')).toEqual(34); }); it('should be that that the second example resolves to 14', () => { - expect(p2('1x1x10')).to.equal(14); + expect(p2('1x1x10')).toEqual(14); }); }); diff --git a/solutions/typescript/2015/03/src/p1.spec.ts b/solutions/typescript/2015/03/src/p1.spec.ts index a6bed7716..454f65c8e 100644 --- a/solutions/typescript/2015/03/src/p1.spec.ts +++ b/solutions/typescript/2015/03/src/p1.spec.ts @@ -6,18 +6,18 @@ import { p1 } from './p1.js'; describe('2015 - Day 3 - Part One', () => { it('should resolve to 2572 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2572); + expect(p1(resources.input)).toEqual(2572); }); it('should be that that the first example resolves to 2', () => { - expect(p1('>')).to.equal(2); + expect(p1('>')).toEqual(2); }); it('should be that that the second example resolves to 4', () => { - expect(p1('^>v<')).to.equal(4); + expect(p1('^>v<')).toEqual(4); }); it('should be that that the third example resolves to 2', () => { - expect(p1('^v^v^v^v^v')).to.equal(2); + expect(p1('^v^v^v^v^v')).toEqual(2); }); }); diff --git a/solutions/typescript/2015/03/src/p2.spec.ts b/solutions/typescript/2015/03/src/p2.spec.ts index 846327b09..148fbf6f0 100644 --- a/solutions/typescript/2015/03/src/p2.spec.ts +++ b/solutions/typescript/2015/03/src/p2.spec.ts @@ -6,18 +6,18 @@ import { p2 } from './p2.js'; describe('2015 - Day 3 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2631); + expect(p2(resources.input)).toEqual(2631); }); it('should be that that the first example resolves to 3', () => { - expect(p2('^v')).to.equal(3); + expect(p2('^v')).toEqual(3); }); it('should be that that the second example resolves to 3', () => { - expect(p2('^>v<')).to.equal(3); + expect(p2('^>v<')).toEqual(3); }); it('should be that that the third example resolves to 11', () => { - expect(p2('^v^v^v^v^v')).to.equal(11); + expect(p2('^v^v^v^v^v')).toEqual(11); }); }); diff --git a/solutions/typescript/2015/04/src/p1.spec.ts b/solutions/typescript/2015/04/src/p1.spec.ts index 9e9ba637e..36bc5d161 100644 --- a/solutions/typescript/2015/04/src/p1.spec.ts +++ b/solutions/typescript/2015/04/src/p1.spec.ts @@ -8,7 +8,7 @@ describe('2015 - Day 4 - Part One', () => { 'should resolve to 346386 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(346_386); + expect(p1(resources.input)).toEqual(346_386); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2015 - Day 4 - Part One', () => { 'should resolve to 609043 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(609_043); + expect(p1(resources.input)).toEqual(609_043); }, { timeout: 20_000 }, ); @@ -26,7 +26,7 @@ describe('2015 - Day 4 - Part One', () => { 'should resolve to 1048970 when using the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(1_048_970); + expect(p1(resources.input)).toEqual(1_048_970); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2015/04/src/p2.spec.ts b/solutions/typescript/2015/04/src/p2.spec.ts index 7c58b65f9..bacd2cfa6 100644 --- a/solutions/typescript/2015/04/src/p2.spec.ts +++ b/solutions/typescript/2015/04/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2015 - Day 4 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(9_958_218); + expect(p2(resources.input)).toEqual(9_958_218); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2015 - Day 4 - Part Two', () => { 'should resolve to 6742839 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(6_742_839); + expect(p2(resources.input)).toEqual(6_742_839); }, { timeout: 20_000 }, ); @@ -26,7 +26,7 @@ describe('2015 - Day 4 - Part Two', () => { 'should resolve to 5714438 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(5_714_438); + expect(p2(resources.input)).toEqual(5_714_438); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2015/05/src/p1.spec.ts b/solutions/typescript/2015/05/src/p1.spec.ts index be554e63b..e5df6fade 100644 --- a/solutions/typescript/2015/05/src/p1.spec.ts +++ b/solutions/typescript/2015/05/src/p1.spec.ts @@ -6,26 +6,26 @@ import { isNice, p1 } from './p1.js'; describe('2015 - Day 5 - Part One', () => { it('should resolve to 236 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(236); + expect(p1(resources.input)).toEqual(236); }); it('should true that example 1 is nice', () => { - expect(isNice('ugknbfddgicrmopn')).to.equal(true); + expect(isNice('ugknbfddgicrmopn')).toEqual(true); }); it('should true that example 2 is nice', () => { - expect(isNice('aaa')).to.equal(true); + expect(isNice('aaa')).toEqual(true); }); it('should true that example 3 is naughty', () => { - expect(isNice('jchzalrnumimnmhp')).to.equal(false); + expect(isNice('jchzalrnumimnmhp')).toEqual(false); }); it('should true that example 4 is naughty', () => { - expect(isNice('haegwjzuvuyypxyu')).to.equal(false); + expect(isNice('haegwjzuvuyypxyu')).toEqual(false); }); it('should true that example 5 is naughty', () => { - expect(isNice('dvszwmarrgswjxmb')).to.equal(false); + expect(isNice('dvszwmarrgswjxmb')).toEqual(false); }); }); diff --git a/solutions/typescript/2015/05/src/p2.spec.ts b/solutions/typescript/2015/05/src/p2.spec.ts index 8e78ffb49..dcf8efb29 100644 --- a/solutions/typescript/2015/05/src/p2.spec.ts +++ b/solutions/typescript/2015/05/src/p2.spec.ts @@ -6,22 +6,22 @@ import { isNice, p2 } from './p2.js'; describe('2015 - Day 5 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(51); + expect(p2(resources.input)).toEqual(51); }); it('should true that example 1 is nice', () => { - expect(isNice('qjhvhtzxzqqjkmpb')).to.equal(true); + expect(isNice('qjhvhtzxzqqjkmpb')).toEqual(true); }); it('should true that example 2 is nice', () => { - expect(isNice('xxyxx')).to.equal(true); + expect(isNice('xxyxx')).toEqual(true); }); it('should true that example 3 is naughty', () => { - expect(isNice('uurcxstgmygtbstg')).to.equal(false); + expect(isNice('uurcxstgmygtbstg')).toEqual(false); }); it('should true that example 4 is naughty', () => { - expect(isNice('ieodomkazucvgmuy')).to.equal(false); + expect(isNice('ieodomkazucvgmuy')).toEqual(false); }); }); diff --git a/solutions/typescript/2016/01/src/p1.spec.ts b/solutions/typescript/2016/01/src/p1.spec.ts index 53b22d528..ea9ccf2c7 100644 --- a/solutions/typescript/2016/01/src/p1.spec.ts +++ b/solutions/typescript/2016/01/src/p1.spec.ts @@ -6,18 +6,18 @@ import { p1 } from './p1.js'; describe('2016 - Day 1 - Part One', () => { it('should resolve to 300 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(300); + expect(p1(resources.input)).toEqual(300); }); it('should be that that the first example resolves to 5', () => { - expect(p1('R2, L3')).to.equal(5); + expect(p1('R2, L3')).toEqual(5); }); it('should be that that the second example resolves to 2', () => { - expect(p1('R2, R2, R2')).to.equal(2); + expect(p1('R2, R2, R2')).toEqual(2); }); it('should be that that the third example resolves to 12', () => { - expect(p1('R5, L5, R5, R3')).to.equal(12); + expect(p1('R5, L5, R5, R3')).toEqual(12); }); }); diff --git a/solutions/typescript/2016/01/src/p2.spec.ts b/solutions/typescript/2016/01/src/p2.spec.ts index a174e6ae5..445ffd6cd 100644 --- a/solutions/typescript/2016/01/src/p2.spec.ts +++ b/solutions/typescript/2016/01/src/p2.spec.ts @@ -6,10 +6,10 @@ import { p2 } from './p2.js'; describe('2016 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(159); + expect(p2(resources.input)).toEqual(159); }); it('should be that that the example resolves to 4', () => { - expect(p2('R8, R4, R4, R8')).to.equal(4); + expect(p2('R8, R4, R4, R8')).toEqual(4); }); }); diff --git a/solutions/typescript/2016/02/src/p1.spec.ts b/solutions/typescript/2016/02/src/p1.spec.ts index 688ad16aa..bd1dc315f 100644 --- a/solutions/typescript/2016/02/src/p1.spec.ts +++ b/solutions/typescript/2016/02/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2016 - Day 2 - Part One', () => { it('should resolve to 24862 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(24_862); + expect(p1(resources.input)).toEqual(24_862); }); it('should be that that the first example resolves to 1985', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(1985); + expect(p1(resources.input)).toEqual(1985); }); }); diff --git a/solutions/typescript/2016/02/src/p2.spec.ts b/solutions/typescript/2016/02/src/p2.spec.ts index ebc78fe63..b57698fb6 100644 --- a/solutions/typescript/2016/02/src/p2.spec.ts +++ b/solutions/typescript/2016/02/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2016 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('46C91'); + expect(p2(resources.input)).toEqual('46C91'); }); it('should be that that the first example resolves to 5DB3', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal('5DB3'); + expect(p2(resources.input)).toEqual('5DB3'); }); }); diff --git a/solutions/typescript/2016/03/src/p1.spec.ts b/solutions/typescript/2016/03/src/p1.spec.ts index f772372e4..e0632ac90 100644 --- a/solutions/typescript/2016/03/src/p1.spec.ts +++ b/solutions/typescript/2016/03/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2016 - Day 3 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(869); + expect(p1(resources.input)).toEqual(869); }); }); diff --git a/solutions/typescript/2016/03/src/p2.spec.ts b/solutions/typescript/2016/03/src/p2.spec.ts index e2695c639..71452c8d9 100644 --- a/solutions/typescript/2016/03/src/p2.spec.ts +++ b/solutions/typescript/2016/03/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2016 - Day 3 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1544); + expect(p2(resources.input)).toEqual(1544); }); }); diff --git a/solutions/typescript/2017/01/src/p1.spec.ts b/solutions/typescript/2017/01/src/p1.spec.ts index 9bc0327c3..692c20b33 100644 --- a/solutions/typescript/2017/01/src/p1.spec.ts +++ b/solutions/typescript/2017/01/src/p1.spec.ts @@ -6,22 +6,22 @@ import { p1 } from './p1.js'; describe('2017 - Day 1 - Part One', () => { it('should resolve to 1177 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1177); + expect(p1(resources.input)).toEqual(1177); }); it('should be that that the first example resolves to 3', () => { - expect(p1('1122')).to.equal(3); + expect(p1('1122')).toEqual(3); }); it('should be that that the second example resolves to 3', () => { - expect(p1('1111')).to.equal(4); + expect(p1('1111')).toEqual(4); }); it('should be that that the third example resolves to 0', () => { - expect(p1('1234')).to.equal(0); + expect(p1('1234')).toEqual(0); }); it('should be that that the fourth example resolves to 9', () => { - expect(p1('91212129')).to.equal(9); + expect(p1('91212129')).toEqual(9); }); }); diff --git a/solutions/typescript/2017/01/src/p2.spec.ts b/solutions/typescript/2017/01/src/p2.spec.ts index 2dfe34242..6da292f00 100644 --- a/solutions/typescript/2017/01/src/p2.spec.ts +++ b/solutions/typescript/2017/01/src/p2.spec.ts @@ -6,26 +6,26 @@ import { p2 } from './p2.js'; describe('2017 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1060); + expect(p2(resources.input)).toEqual(1060); }); it('should be that that the first example resolves to 3', () => { - expect(p2('1212')).to.equal(6); + expect(p2('1212')).toEqual(6); }); it('should be that that the second example resolves to 3', () => { - expect(p2('1221')).to.equal(0); + expect(p2('1221')).toEqual(0); }); it('should be that that the third example resolves to 0', () => { - expect(p2('123425')).to.equal(4); + expect(p2('123425')).toEqual(4); }); it('should be that that the fourth example resolves to 9', () => { - expect(p2('123123')).to.equal(12); + expect(p2('123123')).toEqual(12); }); it('should be that that the fifth example resolves to 4', () => { - expect(p2('12131415')).to.equal(4); + expect(p2('12131415')).toEqual(4); }); }); diff --git a/solutions/typescript/2017/02/src/p1.spec.ts b/solutions/typescript/2017/02/src/p1.spec.ts index 628d29653..46771ce04 100644 --- a/solutions/typescript/2017/02/src/p1.spec.ts +++ b/solutions/typescript/2017/02/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2017 - Day 2 - Part One', () => { it('should resolve to when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(47_136); + expect(p1(resources.input)).toEqual(47_136); }); it('should be that that the first example resolves to 18', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(18); + expect(p1(resources.input)).toEqual(18); }); it('should be that that the second example resolves to 18', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(18); + expect(p1(resources.input)).toEqual(18); }); }); diff --git a/solutions/typescript/2017/02/src/p2.spec.ts b/solutions/typescript/2017/02/src/p2.spec.ts index b24f46c12..6503eefef 100644 --- a/solutions/typescript/2017/02/src/p2.spec.ts +++ b/solutions/typescript/2017/02/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2017 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(250); + expect(p2(resources.input)).toEqual(250); }); it('should be that that the second example resolves to 18', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(9); + expect(p2(resources.input)).toEqual(9); }); }); diff --git a/solutions/typescript/2018/01/src/p1.spec.ts b/solutions/typescript/2018/01/src/p1.spec.ts index 451a349a1..9efab7a63 100644 --- a/solutions/typescript/2018/01/src/p1.spec.ts +++ b/solutions/typescript/2018/01/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 1 - Part One', () => { it('should resolve to 408 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(408); + expect(p1(resources.input)).toEqual(408); }); it('should resolve to 4 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(4); + expect(p1(resources.input)).toEqual(4); }); }); diff --git a/solutions/typescript/2018/01/src/p2.spec.ts b/solutions/typescript/2018/01/src/p2.spec.ts index 54f526f16..6784a769b 100644 --- a/solutions/typescript/2018/01/src/p2.spec.ts +++ b/solutions/typescript/2018/01/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(55_250); + expect(p2(resources.input)).toEqual(55_250); }); it('should resolve to 10 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(10); + expect(p2(resources.input)).toEqual(10); }); }); diff --git a/solutions/typescript/2018/02/src/p1.spec.ts b/solutions/typescript/2018/02/src/p1.spec.ts index 219cade8e..6f026dca2 100644 --- a/solutions/typescript/2018/02/src/p1.spec.ts +++ b/solutions/typescript/2018/02/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 2 - Part One', () => { it('should resolve to 5456 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(5456); + expect(p1(resources.input)).toEqual(5456); }); it('should resolve to 12 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(12); + expect(p1(resources.input)).toEqual(12); }); }); diff --git a/solutions/typescript/2018/02/src/p2.spec.ts b/solutions/typescript/2018/02/src/p2.spec.ts index e5adae675..6bc1e807a 100644 --- a/solutions/typescript/2018/02/src/p2.spec.ts +++ b/solutions/typescript/2018/02/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('megsdlpulxvinkatfoyzxcbvq'); + expect(p2(resources.input)).toEqual('megsdlpulxvinkatfoyzxcbvq'); }); it('should resolve to abcde when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal('abcde'); + expect(p2(resources.input)).toEqual('abcde'); }); }); diff --git a/solutions/typescript/2018/03/src/p1.spec.ts b/solutions/typescript/2018/03/src/p1.spec.ts index e6acfffa6..2cba0c94a 100644 --- a/solutions/typescript/2018/03/src/p1.spec.ts +++ b/solutions/typescript/2018/03/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 3 - Part One', () => { it('should resolve to 116920 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(116_920); + expect(p1(resources.input)).toEqual(116_920); }); it('should resolve to 4 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(4); + expect(p1(resources.input)).toEqual(4); }); }); diff --git a/solutions/typescript/2018/03/src/p2.spec.ts b/solutions/typescript/2018/03/src/p2.spec.ts index f273594ee..337e460e1 100644 --- a/solutions/typescript/2018/03/src/p2.spec.ts +++ b/solutions/typescript/2018/03/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 3 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(382); + expect(p2(resources.input)).toEqual(382); }); it('should resolve to 3 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(3); + expect(p2(resources.input)).toEqual(3); }); }); diff --git a/solutions/typescript/2018/04/src/p1.spec.ts b/solutions/typescript/2018/04/src/p1.spec.ts index b551e6bbb..ec3243b6b 100644 --- a/solutions/typescript/2018/04/src/p1.spec.ts +++ b/solutions/typescript/2018/04/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 4 - Part One', () => { it('should resolve to 106710 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(106_710); + expect(p1(resources.input)).toEqual(106_710); }); it('should resolve to 240 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(240); + expect(p1(resources.input)).toEqual(240); }); }); diff --git a/solutions/typescript/2018/04/src/p2.spec.ts b/solutions/typescript/2018/04/src/p2.spec.ts index f4db49aac..866bb054e 100644 --- a/solutions/typescript/2018/04/src/p2.spec.ts +++ b/solutions/typescript/2018/04/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 4 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(10_491); + expect(p2(resources.input)).toEqual(10_491); }); it('should resolve to 4455 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(4455); + expect(p2(resources.input)).toEqual(4455); }); }); diff --git a/solutions/typescript/2018/05/src/p1.spec.ts b/solutions/typescript/2018/05/src/p1.spec.ts index 2791e7dd9..8faa995bb 100644 --- a/solutions/typescript/2018/05/src/p1.spec.ts +++ b/solutions/typescript/2018/05/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 5 - Part One', () => { it('should resolve to 9202 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(9202); + expect(p1(resources.input)).toEqual(9202); }); it('should resolve to 10 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(10); + expect(p1(resources.input)).toEqual(10); }); }); diff --git a/solutions/typescript/2018/05/src/p2.spec.ts b/solutions/typescript/2018/05/src/p2.spec.ts index e74e7f77e..97a1e7c62 100644 --- a/solutions/typescript/2018/05/src/p2.spec.ts +++ b/solutions/typescript/2018/05/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2018 - Day 5 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(6394); + expect(p2(resources.input)).toEqual(6394); }, { timeout: 10_000 }, ); @@ -17,7 +17,7 @@ describe('2018 - Day 5 - Part Two', () => { 'should resolve to 4 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(4); + expect(p2(resources.input)).toEqual(4); }, { timeout: 10_000 }, ); diff --git a/solutions/typescript/2018/06/src/model/coord.class.spec.ts b/solutions/typescript/2018/06/src/model/coord.class.spec.ts index 95c733e87..d3b69a906 100644 --- a/solutions/typescript/2018/06/src/model/coord.class.spec.ts +++ b/solutions/typescript/2018/06/src/model/coord.class.spec.ts @@ -7,15 +7,15 @@ describe('2018 - Day 6 - Coord', () => { const c: Coord = new Coord(7, 2); it('should the manhattan distance between (1, 1) and (3, 3) be 4', () => { - expect(a.manhattanCoord(b)).to.equal(4); + expect(a.manhattanCoord(b)).toEqual(4); }); it('should the manhattan distance between (3, 3) and (7, 2) be 4', () => { - expect(b.manhattanCoord(c)).to.equal(5); + expect(b.manhattanCoord(c)).toEqual(5); }); it('should the that the manhattan distance is commutative', () => { - expect(a.manhattanCoord(b)).to.equal(b.manhattanCoord(a)); - expect(a.manhattanCoord(c)).to.equal(c.manhattanCoord(a)); + expect(a.manhattanCoord(b)).toEqual(b.manhattanCoord(a)); + expect(a.manhattanCoord(c)).toEqual(c.manhattanCoord(a)); }); }); diff --git a/solutions/typescript/2018/06/src/p1.spec.ts b/solutions/typescript/2018/06/src/p1.spec.ts index a972e170d..c24a6a85d 100644 --- a/solutions/typescript/2018/06/src/p1.spec.ts +++ b/solutions/typescript/2018/06/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 6 - Part One', () => { it('should resolve to 3006 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(3006); + expect(p1(resources.input)).toEqual(3006); }); it('should resolve to 17 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(17); + expect(p1(resources.input)).toEqual(17); }); }); diff --git a/solutions/typescript/2018/06/src/p2.spec.ts b/solutions/typescript/2018/06/src/p2.spec.ts index 5420e021c..a4ddae2ec 100644 --- a/solutions/typescript/2018/06/src/p2.spec.ts +++ b/solutions/typescript/2018/06/src/p2.spec.ts @@ -7,11 +7,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 6 - Part Two', () => { it('should solve the input', async () => { const { input, args } = await loadTaskResources(packageJson.aoc); - expect(p2(input, args)).to.equal(42_998); + expect(p2(input, args)).toEqual(42_998); }); it('should resolve to ${results.two.example} when using the example', async () => { const { input, args } = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(input, args)).to.equal(16); + expect(p2(input, args)).toEqual(16); }); }); diff --git a/solutions/typescript/2018/07/src/p1.spec.ts b/solutions/typescript/2018/07/src/p1.spec.ts index ead381afb..4fa2a1c93 100644 --- a/solutions/typescript/2018/07/src/p1.spec.ts +++ b/solutions/typescript/2018/07/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 7 - Part One', () => { it('should resolve to GRTAHKLQVYWXMUBCZPIJFEDNSO when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal('GRTAHKLQVYWXMUBCZPIJFEDNSO'); + expect(p1(resources.input)).toEqual('GRTAHKLQVYWXMUBCZPIJFEDNSO'); }); it('should resolve to CABDFE when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal('CABDFE'); + expect(p1(resources.input)).toEqual('CABDFE'); }); }); diff --git a/solutions/typescript/2018/07/src/p2.spec.ts b/solutions/typescript/2018/07/src/p2.spec.ts index f81751a5a..5d2cf8ff8 100644 --- a/solutions/typescript/2018/07/src/p2.spec.ts +++ b/solutions/typescript/2018/07/src/p2.spec.ts @@ -12,36 +12,36 @@ describe('2018 - Day 7 - Part Two', () => { const NODE_Z: Node = new Node('z'); it('Node cost is equal regardless of casing', () => { - expect(NODE_A.cost()).to.equal(NODE_UA.cost()); + expect(NODE_A.cost()).toEqual(NODE_UA.cost()); }); it('Node cost of a is 61', () => { - expect(NODE_A.cost(true)).to.equal(61); + expect(NODE_A.cost(true)).toEqual(61); }); it('Node cost of non base a is 1', () => { - expect(NODE_A.cost()).to.equal(1); + expect(NODE_A.cost()).toEqual(1); }); it('Node cost of b is 62', () => { - expect(NODE_B.cost(true)).to.equal(62); + expect(NODE_B.cost(true)).toEqual(62); }); it('Node cost of non base b is 2', () => { - expect(NODE_B.cost()).to.equal(2); + expect(NODE_B.cost()).toEqual(2); }); it('Node cost of z is 86', () => { - expect(NODE_Z.cost(true)).to.equal(86); + expect(NODE_Z.cost(true)).toEqual(86); }); it('should solve the input', async () => { const { input, args } = await loadTaskResources(packageJson.aoc); - expect(p2(input, args)).to.equal(1115); + expect(p2(input, args)).toEqual(1115); }); it('should solve the example', async () => { const { input, args } = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(input, args)).to.equal(15); + expect(p2(input, args)).toEqual(15); }); }); diff --git a/solutions/typescript/2018/08/src/p1.spec.ts b/solutions/typescript/2018/08/src/p1.spec.ts index 8b84a2699..01b003b27 100644 --- a/solutions/typescript/2018/08/src/p1.spec.ts +++ b/solutions/typescript/2018/08/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 8 - Part One', () => { it('should resolve to 47112 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(47_112); + expect(p1(resources.input)).toEqual(47_112); }); it('should resolve to 138 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(138); + expect(p1(resources.input)).toEqual(138); }); }); diff --git a/solutions/typescript/2018/08/src/p2.spec.ts b/solutions/typescript/2018/08/src/p2.spec.ts index ff0365c5c..afd7e3914 100644 --- a/solutions/typescript/2018/08/src/p2.spec.ts +++ b/solutions/typescript/2018/08/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 8 - Part Two', () => { it('should resolve to 28237 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(28_237); + expect(p2(resources.input)).toEqual(28_237); }); it('should resolve to 66 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(66); + expect(p2(resources.input)).toEqual(66); }); }); diff --git a/solutions/typescript/2018/09/src/p1.spec.ts b/solutions/typescript/2018/09/src/p1.spec.ts index 129c848cd..d644b7b9e 100644 --- a/solutions/typescript/2018/09/src/p1.spec.ts +++ b/solutions/typescript/2018/09/src/p1.spec.ts @@ -6,36 +6,36 @@ import { p1 } from './p1.js'; describe('2018 - Day 9 - Part One', () => { it('should resolve to 361466 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(361_466); + expect(p1(resources.input)).toEqual(361_466); }); it('should resolve to 32 when using the zeroth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.0.txt'); - expect(p1(resources.input)).to.equal(32); + expect(p1(resources.input)).toEqual(32); }); it('should resolve to 8317 when using the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(8317); + expect(p1(resources.input)).toEqual(8317); }); it('should resolve to 146373 when using the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(146_373); + expect(p1(resources.input)).toEqual(146_373); }); it('should resolve to 2764 when using the third example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(2764); + expect(p1(resources.input)).toEqual(2764); }); it('should resolve to 54718 when using the fourth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p1(resources.input)).to.equal(54_718); + expect(p1(resources.input)).toEqual(54_718); }); it('should resolve to 37305 when using the fifth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p1(resources.input)).to.equal(37_305); + expect(p1(resources.input)).toEqual(37_305); }); }); diff --git a/solutions/typescript/2018/09/src/p2.spec.ts b/solutions/typescript/2018/09/src/p2.spec.ts index 475a634ce..b423cbb64 100644 --- a/solutions/typescript/2018/09/src/p2.spec.ts +++ b/solutions/typescript/2018/09/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2018 - Day 9 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2_945_918_550); + expect(p2(resources.input)).toEqual(2_945_918_550); }); }); diff --git a/solutions/typescript/2018/10/src/p1.spec.ts b/solutions/typescript/2018/10/src/p1.spec.ts index 43354585d..880dedf96 100644 --- a/solutions/typescript/2018/10/src/p1.spec.ts +++ b/solutions/typescript/2018/10/src/p1.spec.ts @@ -3,11 +3,11 @@ import { describe, expect, it } from 'vitest'; describe('2018 - Day 10 - Part One', () => { it('should solve the input', () => { // Output text is not parsed - expect('KBJHEZCB').to.equal('KBJHEZCB'); + expect('KBJHEZCB').toEqual('KBJHEZCB'); }); it('should solve the input', () => { // Output text is not parsed - expect('HI').to.equal('HI'); + expect('HI').toEqual('HI'); }); }); diff --git a/solutions/typescript/2018/10/src/p2.spec.ts b/solutions/typescript/2018/10/src/p2.spec.ts index 49770f007..91f59c46b 100644 --- a/solutions/typescript/2018/10/src/p2.spec.ts +++ b/solutions/typescript/2018/10/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 10 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(10_369); + expect(p2(resources.input)).toEqual(10_369); }); it('should resolve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(3); + expect(p2(resources.input)).toEqual(3); }); }); diff --git a/solutions/typescript/2018/11/src/functions/ripple.function.spec.ts b/solutions/typescript/2018/11/src/functions/ripple.function.spec.ts index 7e130a2fb..3b8e441e9 100644 --- a/solutions/typescript/2018/11/src/functions/ripple.function.spec.ts +++ b/solutions/typescript/2018/11/src/functions/ripple.function.spec.ts @@ -3,6 +3,6 @@ import { ripple } from './ripple.function.js'; describe('Day 11 - Ripple', () => { it('Should be only 40 of them:', () => { - expect(ripple(5, 3, 4).length).to.equal(40); + expect(ripple(5, 3, 4).length).toEqual(40); }); }); diff --git a/solutions/typescript/2018/11/src/p1.spec.ts b/solutions/typescript/2018/11/src/p1.spec.ts index 894e9a03a..937b39544 100644 --- a/solutions/typescript/2018/11/src/p1.spec.ts +++ b/solutions/typescript/2018/11/src/p1.spec.ts @@ -3,10 +3,10 @@ import { p1 } from './p1.js'; describe('2018 - Day 11 - Part One', () => { it('should solve the input', () => { - expect(p1('8561')).to.equal('21,37 (30)'); + expect(p1('8561')).toEqual('21,37 (30)'); }); it('should solve the example', () => { - expect(p1('12345')).to.equal('237,84 (30)'); + expect(p1('12345')).toEqual('237,84 (30)'); }); }); diff --git a/solutions/typescript/2018/11/src/p2.spec.ts b/solutions/typescript/2018/11/src/p2.spec.ts index 5e5afa79a..277aa9c45 100644 --- a/solutions/typescript/2018/11/src/p2.spec.ts +++ b/solutions/typescript/2018/11/src/p2.spec.ts @@ -3,6 +3,6 @@ import { describe, expect, it } from 'vitest'; describe('2018 - Day 11 - Part Two', () => { it('should solve the input', () => { // ~63007ms on i7-8700k@4.8Ghz all 6 cores 100%, so it's just a dummy - expect('236,146,12 (160)').to.equal('236,146,12 (160)'); + expect('236,146,12 (160)').toEqual('236,146,12 (160)'); }); }); diff --git a/solutions/typescript/2018/12/src/model/cave.class.spec.ts b/solutions/typescript/2018/12/src/model/cave.class.spec.ts index b1b7e031a..8e875bc88 100644 --- a/solutions/typescript/2018/12/src/model/cave.class.spec.ts +++ b/solutions/typescript/2018/12/src/model/cave.class.spec.ts @@ -20,14 +20,14 @@ describe('2018 - Day 12 - Cave', () => { for (const input of inputs) { const cave = new Cave(input); cave.normalize(); - expect(cave.row.startsWith('....#')).to.be.true; - expect(cave.row.endsWith('#....')).to.be.true; + expect(cave.row.startsWith('....#')).toEqual(true); + expect(cave.row.endsWith('#....')).toEqual(true); } }); it('Should be a score of 325:', () => { const cave = new Cave('.#....##....#####...#######....#.#..##.'); cave.offset = -3; - expect(cave.score()).to.equal(325); + expect(cave.score()).toEqual(325); }); }); diff --git a/solutions/typescript/2018/12/src/p1.spec.ts b/solutions/typescript/2018/12/src/p1.spec.ts index 245c8603b..b1a5e86b1 100644 --- a/solutions/typescript/2018/12/src/p1.spec.ts +++ b/solutions/typescript/2018/12/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2018 - Day 12 - Part One', () => { it('should resolve to 3230 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(3230); + expect(p1(resources.input)).toEqual(3230); }); it('should resolve to 325 when using the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p1(resources.input)).to.equal(325); + expect(p1(resources.input)).toEqual(325); }); }); diff --git a/solutions/typescript/2018/12/src/p2.spec.ts b/solutions/typescript/2018/12/src/p2.spec.ts index 1aae0246c..578439188 100644 --- a/solutions/typescript/2018/12/src/p2.spec.ts +++ b/solutions/typescript/2018/12/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2018 - Day 12 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(4_400_000_000_304); + expect(p2(resources.input)).toEqual(4_400_000_000_304); }); it('should solve the example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.txt'); - expect(p2(resources.input)).to.equal(999_999_999_374); + expect(p2(resources.input)).toEqual(999_999_999_374); }); }); diff --git a/solutions/typescript/2018/13/src/p1.spec.ts b/solutions/typescript/2018/13/src/p1.spec.ts index 430591e38..3b01183ba 100644 --- a/solutions/typescript/2018/13/src/p1.spec.ts +++ b/solutions/typescript/2018/13/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2018 - Day 13 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal('28,107'); + expect(p1(resources.input)).toEqual('28,107'); }); it('should solve example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal('7,3'); + expect(p1(resources.input)).toEqual('7,3'); }); it('should solve example 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal('2,0'); + expect(p1(resources.input)).toEqual('2,0'); }); }); diff --git a/solutions/typescript/2018/13/src/p2.spec.ts b/solutions/typescript/2018/13/src/p2.spec.ts index f5dacd50e..d3e3eaf0e 100644 --- a/solutions/typescript/2018/13/src/p2.spec.ts +++ b/solutions/typescript/2018/13/src/p2.spec.ts @@ -6,16 +6,16 @@ import { p2 } from './p2.js'; describe('2018 - Day 13 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('36,123'); + expect(p2(resources.input)).toEqual('36,123'); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(undefined); + expect(p2(resources.input)).toEqual(undefined); }); it('should solve the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal('6,4'); + expect(p2(resources.input)).toEqual('6,4'); }); }); diff --git a/solutions/typescript/2018/14/src/p1.spec.ts b/solutions/typescript/2018/14/src/p1.spec.ts index 9fb521004..27b34cd5a 100644 --- a/solutions/typescript/2018/14/src/p1.spec.ts +++ b/solutions/typescript/2018/14/src/p1.spec.ts @@ -3,21 +3,21 @@ import { p1 } from './p1.js'; describe('2018 - Day 14 - Part One', () => { it('should resolve to 1115317115 when using the input', () => { - expect(p1(327_901)).to.equal('1115317115'); + expect(p1(327_901)).toEqual('1115317115'); }); it('Should be 5158916779 after 9 recipe:', () => { - expect(p1(9)).to.equal('5158916779'); + expect(p1(9)).toEqual('5158916779'); }); it('Should be 0124515891 after 5 recipe:', () => { - expect(p1(5)).to.equal('0124515891'); + expect(p1(5)).toEqual('0124515891'); }); it('Should be 9251071085 after 18 recipe:', () => { - expect(p1(18)).to.equal('9251071085'); + expect(p1(18)).toEqual('9251071085'); }); it('Should be 5941429882 after 2018 recipe:', () => { - expect(p1(2018)).to.equal('5941429882'); + expect(p1(2018)).toEqual('5941429882'); }); }); diff --git a/solutions/typescript/2018/14/src/p2.spec.ts b/solutions/typescript/2018/14/src/p2.spec.ts index 095f3f241..b4e9761e2 100644 --- a/solutions/typescript/2018/14/src/p2.spec.ts +++ b/solutions/typescript/2018/14/src/p2.spec.ts @@ -5,40 +5,40 @@ describe('2018 - Day 14 - Part Two', () => { it( 'should solve the input', () => { - expect(p2('327901')).to.equal(20_229_822); + expect(p2('327901')).toEqual(20_229_822); }, { timeout: 20_000 }, ); it('Should take 9 recipes for 5158916779 to appear:', () => { - expect(p2('5158916779')).to.equal(9); + expect(p2('5158916779')).toEqual(9); }); it('Should take 9 recipes for 51589 to appear:', () => { - expect(p2('51589')).to.equal(9); + expect(p2('51589')).toEqual(9); }); it('Should take 5 recipes for 0124515891 to appear:', () => { - expect(p2('0124515891')).to.equal(5); + expect(p2('0124515891')).toEqual(5); }); it('Should take 5 recipes for 01245 to appear:', () => { - expect(p2('01245')).to.equal(5); + expect(p2('01245')).toEqual(5); }); it('Should take 18 recipes for 9251071085 to appear:', () => { - expect(p2('9251071085')).to.equal(18); + expect(p2('9251071085')).toEqual(18); }); it('Should take 18 recipes for 92510 to appear:', () => { - expect(p2('92510')).to.equal(18); + expect(p2('92510')).toEqual(18); }); it('Should take 2018 recipes for 5941429882 to appear:', () => { - expect(p2('5941429882')).to.equal(2018); + expect(p2('5941429882')).toEqual(2018); }); it('Should take 2018 recipes for 59414 to appear:', () => { - expect(p2('59414')).to.equal(2018); + expect(p2('59414')).toEqual(2018); }); }); diff --git a/solutions/typescript/2019/01/src/p1.spec.ts b/solutions/typescript/2019/01/src/p1.spec.ts index 329349a9c..1faf78752 100644 --- a/solutions/typescript/2019/01/src/p1.spec.ts +++ b/solutions/typescript/2019/01/src/p1.spec.ts @@ -6,22 +6,22 @@ import { p1 } from './p1.js'; describe('2019 - Day 1 - Part One', () => { it('should resolve to 3399947 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(3_399_947); + expect(p1(resources.input)).toEqual(3_399_947); }); it('should be that that the first example resolves to 2', () => { - expect(p1('12')).to.equal(2); + expect(p1('12')).toEqual(2); }); it('should be that that the second example resolves to 2', () => { - expect(p1('14')).to.equal(2); + expect(p1('14')).toEqual(2); }); it('should be that that the third example resolves to 654', () => { - expect(p1('1969')).to.equal(654); + expect(p1('1969')).toEqual(654); }); it('should be that that the fourth example resolves to 33583', () => { - expect(p1('100756')).to.equal(33_583); + expect(p1('100756')).toEqual(33_583); }); }); diff --git a/solutions/typescript/2019/01/src/p2.spec.ts b/solutions/typescript/2019/01/src/p2.spec.ts index 2dc56bb6a..be545807a 100644 --- a/solutions/typescript/2019/01/src/p2.spec.ts +++ b/solutions/typescript/2019/01/src/p2.spec.ts @@ -6,18 +6,18 @@ import { p2 } from './p2.js'; describe('2019 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(5_097_039); + expect(p2(resources.input)).toEqual(5_097_039); }); it('should be that that the first example resolves to 2', () => { - expect(p2('14')).to.equal(2); + expect(p2('14')).toEqual(2); }); it('should be that that the second example resolves to 966', () => { - expect(p2('1969')).to.equal(966); + expect(p2('1969')).toEqual(966); }); it('should be that that the third example resolves to 50346', () => { - expect(p2('100756')).to.equal(50_346); + expect(p2('100756')).toEqual(50_346); }); }); diff --git a/solutions/typescript/2019/02/src/p1.spec.ts b/solutions/typescript/2019/02/src/p1.spec.ts index 77669901e..62462b267 100644 --- a/solutions/typescript/2019/02/src/p1.spec.ts +++ b/solutions/typescript/2019/02/src/p1.spec.ts @@ -8,36 +8,36 @@ import { parse } from './parse.js'; describe('2019 - Day 2 - Part One', () => { it('should resolve to 3101844 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(3_101_844); + expect(p1(resources.input)).toEqual(3_101_844); }); it('should be that that the first example resolves to 3500', () => { const computer = new IntCodeComputer(parse('1,9,10,3,2,3,11,0,99,30,40,50')); computer.execute(); - expect(computer.peek(0)).to.equal(3500); + expect(computer.peek(0)).toEqual(3500); }); it('should be that that the second example resolves to 2', () => { const computer = new IntCodeComputer(parse('1,0,0,0,99')); computer.execute(); - expect(computer.peek(0)).to.equal(2); + expect(computer.peek(0)).toEqual(2); }); it('should be that that the third example resolves to 2', () => { const computer = new IntCodeComputer(parse('2,3,0,3,99')); computer.execute(); - expect(computer.peek(0)).to.equal(2); + expect(computer.peek(0)).toEqual(2); }); it('should be that that the fourth example resolves to 2', () => { const computer = new IntCodeComputer(parse('2,4,4,5,99,0')); computer.execute(); - expect(computer.peek(0)).to.equal(2); + expect(computer.peek(0)).toEqual(2); }); it('should be that that the fifth example resolves to 30', () => { const computer = new IntCodeComputer(parse('1,1,1,4,99,5,6,0,99')); computer.execute(); - expect(computer.peek(0)).to.equal(30); + expect(computer.peek(0)).toEqual(30); }); }); diff --git a/solutions/typescript/2019/02/src/p2.spec.ts b/solutions/typescript/2019/02/src/p2.spec.ts index 2461ed97c..3641ce9de 100644 --- a/solutions/typescript/2019/02/src/p2.spec.ts +++ b/solutions/typescript/2019/02/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(8478); + expect(p2(resources.input)).toEqual(8478); }); }); diff --git a/solutions/typescript/2019/03/src/p1.spec.ts b/solutions/typescript/2019/03/src/p1.spec.ts index c6bdbb8e9..3a28d9f75 100644 --- a/solutions/typescript/2019/03/src/p1.spec.ts +++ b/solutions/typescript/2019/03/src/p1.spec.ts @@ -6,15 +6,15 @@ import { p1 } from './p1.js'; describe('2019 - Day 3 - Part One', () => { it('should resolve to 1195 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1195); + expect(p1(resources.input)).toEqual(1195); }); it('should be that that the first example resolves to 610', () => { - expect(p1('R8,U5,L5,D3\nU7,R6,D4,L4')).to.equal(6); + expect(p1('R8,U5,L5,D3\nU7,R6,D4,L4')).toEqual(6); }); it('should be that that the second example resolves to 159', () => { - expect(p1('R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83')).to.equal( + expect(p1('R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83')).toEqual( 159, ); }); @@ -22,6 +22,6 @@ describe('2019 - Day 3 - Part One', () => { it('should be that that the third example resolves to 135', () => { expect( p1('R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51\nU98,R91,D20,R16,D67,R40,U7,R15,U6,R7'), - ).to.equal(135); + ).toEqual(135); }); }); diff --git a/solutions/typescript/2019/03/src/p2.spec.ts b/solutions/typescript/2019/03/src/p2.spec.ts index aafa1b49c..64c29615f 100644 --- a/solutions/typescript/2019/03/src/p2.spec.ts +++ b/solutions/typescript/2019/03/src/p2.spec.ts @@ -6,15 +6,15 @@ import { p2 } from './p2.js'; describe('2019 - Day 3 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(91_518); + expect(p2(resources.input)).toEqual(91_518); }); it('should be that that the first example resolves to 610', () => { - expect(p2('R8,U5,L5,D3\nU7,R6,D4,L4')).to.equal(30); + expect(p2('R8,U5,L5,D3\nU7,R6,D4,L4')).toEqual(30); }); it('should be that that the second example resolves to 610', () => { - expect(p2('R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83')).to.equal( + expect(p2('R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83')).toEqual( 610, ); }); @@ -22,6 +22,6 @@ describe('2019 - Day 3 - Part Two', () => { it('should be that that the third example resolves to 410', () => { expect( p2('R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51\nU98,R91,D20,R16,D67,R40,U7,R15,U6,R7'), - ).to.equal(410); + ).toEqual(410); }); }); diff --git a/solutions/typescript/2019/04/src/p1.spec.ts b/solutions/typescript/2019/04/src/p1.spec.ts index f84e0de1e..bd41bc804 100644 --- a/solutions/typescript/2019/04/src/p1.spec.ts +++ b/solutions/typescript/2019/04/src/p1.spec.ts @@ -6,18 +6,18 @@ import { p1 } from './p1.js'; describe('2019 - Day 4 - Part One', () => { it('should resolve to 1694 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1694); + expect(p1(resources.input)).toEqual(1694); }); it('should be that that the first example resolves to 1', () => { - expect(p1('111111-111111')).to.equal(1); + expect(p1('111111-111111')).toEqual(1); }); it('should be that that the second example resolves to 0', () => { - expect(p1('223450-223450')).to.equal(0); + expect(p1('223450-223450')).toEqual(0); }); it('should be that that the third example resolves to 0', () => { - expect(p1('123789-123789')).to.equal(0); + expect(p1('123789-123789')).toEqual(0); }); }); diff --git a/solutions/typescript/2019/04/src/p2.spec.ts b/solutions/typescript/2019/04/src/p2.spec.ts index 3b764d02a..f739d6ca6 100644 --- a/solutions/typescript/2019/04/src/p2.spec.ts +++ b/solutions/typescript/2019/04/src/p2.spec.ts @@ -6,18 +6,18 @@ import { p2 } from './p2.js'; describe('2019 - Day 4 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1148); + expect(p2(resources.input)).toEqual(1148); }); it('should be that that the first example resolves to 1', () => { - expect(p2('112233-112233')).to.equal(1); + expect(p2('112233-112233')).toEqual(1); }); it('should be that that the second example resolves to 0', () => { - expect(p2('123444-123444')).to.equal(0); + expect(p2('123444-123444')).toEqual(0); }); it('should be that that the third example resolves to 1', () => { - expect(p2('111122-111122')).to.equal(1); + expect(p2('111122-111122')).toEqual(1); }); }); diff --git a/solutions/typescript/2019/05/src/p1.spec.ts b/solutions/typescript/2019/05/src/p1.spec.ts index fe136e8a3..8a76f43c3 100644 --- a/solutions/typescript/2019/05/src/p1.spec.ts +++ b/solutions/typescript/2019/05/src/p1.spec.ts @@ -8,12 +8,12 @@ import { parse } from './parse.js'; describe('2019 - Day 5 - Part One', () => { it('should resolve to 16348437 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(16_348_437); + expect(p1(resources.input)).toEqual(16_348_437); }); it('should be that that both the first examples resolves to 0', () => { const computer = new IntCodeComputer(parse('1,0,0,0,99')); computer.execute(); - expect(computer.peek(0)).to.equal(2); + expect(computer.peek(0)).toEqual(2); }); }); diff --git a/solutions/typescript/2019/05/src/p2.spec.ts b/solutions/typescript/2019/05/src/p2.spec.ts index c40ec4e35..a63ffdc78 100644 --- a/solutions/typescript/2019/05/src/p2.spec.ts +++ b/solutions/typescript/2019/05/src/p2.spec.ts @@ -12,86 +12,86 @@ describe('2019 - Day 5 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(6_959_377); + expect(p2(resources.input)).toEqual(6_959_377); }); it('should be that that the first example resolves to 1 when the input is 8', () => { expect( new IntCodeComputer(parse('3,9,8,9,10,9,4,9,99,-1,8')).withInput(8).execute().pop(), - ).to.equal(1); + ).toEqual(1); }); it('should be that that the first example resolves to 0 when the input is less than 8', () => { expect( new IntCodeComputer(parse('3,9,8,9,10,9,4,9,99,-1,8')).withInput(1).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,9,8,9,10,9,4,9,99,-1,8')).withInput(2).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,9,8,9,10,9,4,9,99,-1,8')).withInput(7).execute().pop(), - ).to.equal(0); + ).toEqual(0); }); it('should be that that the second example resolves to 1 when the input is less than 8', () => { expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(1).execute().pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(4).execute().pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(7).execute().pop(), - ).to.equal(1); + ).toEqual(1); }); it('should be that that the second example resolves to 0 when the input is not less than 8', () => { expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(8).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(9).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,9,7,9,10,9,4,9,99,-1,8')).withInput(100).execute().pop(), - ).to.equal(0); + ).toEqual(0); }); it('should be that that the third example resolves to 1 when the input is equal to 8', () => { expect( new IntCodeComputer(parse('3,3,1108,-1,8,3,4,3,99')).withInput(8).execute().pop(), - ).to.equal(1); + ).toEqual(1); }); it('should be that that the third example resolves to 0 when the input is not equal to 8', () => { expect( new IntCodeComputer(parse('3,3,1108,-1,8,3,4,3,99')).withInput(1).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,3,1108,-1,8,3,4,3,99')).withInput(100).execute().pop(), - ).to.equal(0); + ).toEqual(0); }); it('should be that that the fourth example resolves to 1 when the input is less than 8', () => { expect( new IntCodeComputer(parse('3,3,1107,-1,8,3,4,3,99')).withInput(1).execute().pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,3,1107,-1,8,3,4,3,99')).withInput(7).execute().pop(), - ).to.equal(1); + ).toEqual(1); }); it('should be that that the fourth example resolves to 0 when the input is not less than 8', () => { expect( new IntCodeComputer(parse('3,3,1107,-1,8,3,4,3,99')).withInput(8).execute().pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,3,1107,-1,8,3,4,3,99')).withInput(10).execute().pop(), - ).to.equal(0); + ).toEqual(0); }); it('should be that that the fifth and sixth example resolves to 0 when the input is 0', () => { @@ -100,14 +100,14 @@ describe('2019 - Day 5 - Part Two', () => { .withInput(0) .execute() .pop(), - ).to.equal(0); + ).toEqual(0); expect( new IntCodeComputer(parse('3,3,1105,-1,9,1101,0,0,12,4,12,99,1')) .withInput(0) .execute() .pop(), - ).to.equal(0); + ).toEqual(0); }); it('should be that that the fifth and sixth example resolves to 1 when the input is not 0', () => { @@ -116,43 +116,43 @@ describe('2019 - Day 5 - Part Two', () => { .withInput(20) .execute() .pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,12,6,12,15,1,13,14,13,4,13,99,-1,0,1,9')) .withInput(4) .execute() .pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,3,1105,-1,9,1101,0,0,12,4,12,99,1')) .withInput(20) .execute() .pop(), - ).to.equal(1); + ).toEqual(1); expect( new IntCodeComputer(parse('3,3,1105,-1,9,1101,0,0,12,4,12,99,1')) .withInput(4) .execute() .pop(), - ).to.equal(1); + ).toEqual(1); }); it('should be that that the seventh example resolves to 999 when the input is less than 8', () => { - expect(new IntCodeComputer(seventhInput).withInput(6).execute().pop()).to.equal(999); + expect(new IntCodeComputer(seventhInput).withInput(6).execute().pop()).toEqual(999); - expect(new IntCodeComputer(seventhInput).withInput(5).execute().pop()).to.equal(999); + expect(new IntCodeComputer(seventhInput).withInput(5).execute().pop()).toEqual(999); }); it('should be that that the seventh example resolves to 1000 when the input is 8', () => { - expect(new IntCodeComputer(seventhInput).withInput(8).execute().pop()).to.equal(1000); + expect(new IntCodeComputer(seventhInput).withInput(8).execute().pop()).toEqual(1000); }); it('should be that that the seventh example resolves to 1001 when the input is greater than 8', () => { - expect(new IntCodeComputer(seventhInput).withInput(9).execute().pop()).to.equal(1001); + expect(new IntCodeComputer(seventhInput).withInput(9).execute().pop()).toEqual(1001); - expect(new IntCodeComputer(seventhInput).withInput(10).execute().pop()).to.equal(1001); + expect(new IntCodeComputer(seventhInput).withInput(10).execute().pop()).toEqual(1001); }); }); diff --git a/solutions/typescript/2019/06/src/p1.spec.ts b/solutions/typescript/2019/06/src/p1.spec.ts index e127f64f0..f6578a8e9 100644 --- a/solutions/typescript/2019/06/src/p1.spec.ts +++ b/solutions/typescript/2019/06/src/p1.spec.ts @@ -8,7 +8,7 @@ describe('2019 - Day 6 - Part One', () => { 'should resolve to 223251 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(223_251); + expect(p1(resources.input)).toEqual(223_251); }, { timeout: 20_000 }, ); @@ -16,7 +16,7 @@ describe('2019 - Day 6 - Part One', () => { it( 'should be that that the first example resolves to 42', () => { - expect(p1('COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L')).to.equal(42); + expect(p1('COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L')).toEqual(42); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2019/06/src/p2.spec.ts b/solutions/typescript/2019/06/src/p2.spec.ts index b296ad232..861c74c7e 100644 --- a/solutions/typescript/2019/06/src/p2.spec.ts +++ b/solutions/typescript/2019/06/src/p2.spec.ts @@ -6,12 +6,12 @@ import { p2 } from './p2.js'; describe('2019 - Day 6 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(430); + expect(p2(resources.input)).toEqual(430); }); it('should be that that the first example resolves to 4', () => { - expect( - p2('COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L\nK)YOU\nI)SAN'), - ).to.equal(4); + expect(p2('COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L\nK)YOU\nI)SAN')).toEqual( + 4, + ); }); }); diff --git a/solutions/typescript/2019/07/src/p1.spec.ts b/solutions/typescript/2019/07/src/p1.spec.ts index 9c223fbf6..881f5c4c2 100644 --- a/solutions/typescript/2019/07/src/p1.spec.ts +++ b/solutions/typescript/2019/07/src/p1.spec.ts @@ -6,17 +6,17 @@ import { p1 } from './p1.js'; describe('2019 - Day 7 - Part One', () => { it('should resolve to 929800 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(929_800); + expect(p1(resources.input)).toEqual(929_800); }); it('should be that that both the first examples resolves to 43210', () => { - expect(p1('3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0')).to.equal(43_210); + expect(p1('3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0')).toEqual(43_210); }); it('should be that that both the first examples resolves to 54321', () => { expect( p1('3,23,3,24,1002,24,10,24,1002,23,-1,23,101,5,23,23,1,24,23,23,4,23,99,0,0'), - ).to.equal(54_321); + ).toEqual(54_321); }); it('should be that that both the first examples resolves to 54321', () => { @@ -24,6 +24,6 @@ describe('2019 - Day 7 - Part One', () => { p1( '3,31,3,32,1002,32,10,32,1001,31,-2,31,1007,31,0,33,1002,33,7,33,1,33,31,31,1,32,31,31,4,31,99,0,0,0', ), - ).to.equal(65_210); + ).toEqual(65_210); }); }); diff --git a/solutions/typescript/2019/07/src/p2.spec.ts b/solutions/typescript/2019/07/src/p2.spec.ts index 19093ace6..881c9f211 100644 --- a/solutions/typescript/2019/07/src/p2.spec.ts +++ b/solutions/typescript/2019/07/src/p2.spec.ts @@ -6,7 +6,7 @@ import { p2 } from './p2.js'; describe('2019 - Day 7 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(15_432_220); + expect(p2(resources.input)).toEqual(15_432_220); }); it('should be that that the first example resolves to 139629729', () => { @@ -14,7 +14,7 @@ describe('2019 - Day 7 - Part Two', () => { p2( '3,26,1001,26,-4,26,3,27,1002,27,2,27,1,27,26,27,4,27,1001,28,-1,28,1005,28,6,99,0,0,5', ), - ).to.equal(139_629_729); + ).toEqual(139_629_729); }); it('should be that that the first example resolves to 18216', () => { @@ -22,6 +22,6 @@ describe('2019 - Day 7 - Part Two', () => { p2( '3,52,1001,52,-5,52,3,53,1,52,56,54,1007,54,5,55,1005,55,26,1001,54,-5,54,1105,1,12,1,53,54,53,1008,54,0,55,1001,55,1,55,2,53,55,53,4,53,1001,56,-1,56,1005,56,6,99,0,0,0,0,10', ), - ).to.equal(18_216); + ).toEqual(18_216); }); }); diff --git a/solutions/typescript/2019/08/src/p1.spec.ts b/solutions/typescript/2019/08/src/p1.spec.ts index e5101de86..ed5aa9424 100644 --- a/solutions/typescript/2019/08/src/p1.spec.ts +++ b/solutions/typescript/2019/08/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 8 - Part One', () => { it('should resolve to 1088 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1088); + expect(p1(resources.input)).toEqual(1088); }); }); diff --git a/solutions/typescript/2019/08/src/p2.spec.ts b/solutions/typescript/2019/08/src/p2.spec.ts index bd71a3092..3872c60bc 100644 --- a/solutions/typescript/2019/08/src/p2.spec.ts +++ b/solutions/typescript/2019/08/src/p2.spec.ts @@ -7,7 +7,7 @@ describe('2019 - Day 8 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); // 'LGYHB' - expect(p2(resources.input)).to.equal( + expect(p2(resources.input)).toEqual( '\n#`````##``#```##``#`###``\n#````#``#`#```##``#`#``#`\n#````#`````#`#`####`###``\n#````#`##```#``#``#`#``#`\n#````#``#```#``#``#`#``#`\n####``###```#``#``#`###``\n', ); }); diff --git a/solutions/typescript/2019/09/src/p1.spec.ts b/solutions/typescript/2019/09/src/p1.spec.ts index 8eb6fb30e..98db290c6 100644 --- a/solutions/typescript/2019/09/src/p1.spec.ts +++ b/solutions/typescript/2019/09/src/p1.spec.ts @@ -6,20 +6,20 @@ import { p1 } from './p1.js'; describe('2019 - Day 9 - Part One', () => { it('should resolve to 3507134798 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal('3507134798'); + expect(p1(resources.input)).toEqual('3507134798'); }); it('should be that that both the first examples resolves to itself', () => { - expect(p1('109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99')).to.equal( + expect(p1('109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99')).toEqual( '109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99', ); }); it('should be that that both the second examples resolves to 0', () => { - expect(p1('1102,34915192,34915192,7,4,7,99,0')).to.equal('1219070632396864'); + expect(p1('1102,34915192,34915192,7,4,7,99,0')).toEqual('1219070632396864'); }); it('should be that that both the second examples resolves to 0', () => { - expect(p1('104,1125899906842624,99')).to.equal('1125899906842624'); + expect(p1('104,1125899906842624,99')).toEqual('1125899906842624'); }); }); diff --git a/solutions/typescript/2019/09/src/p2.spec.ts b/solutions/typescript/2019/09/src/p2.spec.ts index 38db4248b..831f6d5e8 100644 --- a/solutions/typescript/2019/09/src/p2.spec.ts +++ b/solutions/typescript/2019/09/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 9 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(84_513); + expect(p2(resources.input)).toEqual(84_513); }); }); diff --git a/solutions/typescript/2019/10/src/p1.spec.ts b/solutions/typescript/2019/10/src/p1.spec.ts index 05cf50b88..2b1792a0f 100644 --- a/solutions/typescript/2019/10/src/p1.spec.ts +++ b/solutions/typescript/2019/10/src/p1.spec.ts @@ -6,31 +6,31 @@ import { p1 } from './p1.js'; describe('2019 - Day 10 - Part One', () => { it('should resolve to 230 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(230); + expect(p1(resources.input)).toEqual(230); }); it('should be that that the first example resolves to 8', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(8); + expect(p1(resources.input)).toEqual(8); }); it('should be that that the second example resolves to 33', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(33); + expect(p1(resources.input)).toEqual(33); }); it('should be that that the third example resolves to 35', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(35); + expect(p1(resources.input)).toEqual(35); }); it('should be that that the fourth example resolves to 41', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p1(resources.input)).to.equal(41); + expect(p1(resources.input)).toEqual(41); }); it('should be that that the fifth example resolves to 210', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p1(resources.input)).to.equal(210); + expect(p1(resources.input)).toEqual(210); }); }); diff --git a/solutions/typescript/2019/10/src/p2.spec.ts b/solutions/typescript/2019/10/src/p2.spec.ts index 51da2739a..78b3335a0 100644 --- a/solutions/typescript/2019/10/src/p2.spec.ts +++ b/solutions/typescript/2019/10/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 10 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1205); + expect(p2(resources.input)).toEqual(1205); }); }); diff --git a/solutions/typescript/2019/11/src/p1.spec.ts b/solutions/typescript/2019/11/src/p1.spec.ts index a662117c8..d6719eda5 100644 --- a/solutions/typescript/2019/11/src/p1.spec.ts +++ b/solutions/typescript/2019/11/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 11 - Part One', () => { it('should resolve to 2252 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2252); + expect(p1(resources.input)).toEqual(2252); }); }); diff --git a/solutions/typescript/2019/11/src/p2.spec.ts b/solutions/typescript/2019/11/src/p2.spec.ts index aedddbc88..09ce6937d 100644 --- a/solutions/typescript/2019/11/src/p2.spec.ts +++ b/solutions/typescript/2019/11/src/p2.spec.ts @@ -5,6 +5,6 @@ import { describe, it } from 'vitest'; describe('2019 - Day 11 - Part Two', () => { // TODO: ASCII ART PARSER AGALRGJE it('should solve the input', async () => { - // expect(await p2((await read(year, day)()).input)).to.equal(results.two.input); + // expect(await p2((await read(year, day)()).input)).toEqual(results.two.input); }); }); diff --git a/solutions/typescript/2019/12/src/p1.spec.ts b/solutions/typescript/2019/12/src/p1.spec.ts index 227405328..7adb9ccf7 100644 --- a/solutions/typescript/2019/12/src/p1.spec.ts +++ b/solutions/typescript/2019/12/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2019 - Day 12 - Part One', () => { it('should resolve to 8625 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1()(resources.input)).to.equal(8625); + expect(p1()(resources.input)).toEqual(8625); }); it('should be that that the first examples resolves to 179 after 10 steps', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(10)(resources.input)).to.equal(179); + expect(p1(10)(resources.input)).toEqual(179); }); it('should be that that the second examples resolves to 1940 after a 100 steps', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(100)(resources.input)).to.equal(1940); + expect(p1(100)(resources.input)).toEqual(1940); }); }); diff --git a/solutions/typescript/2019/12/src/p2.spec.ts b/solutions/typescript/2019/12/src/p2.spec.ts index 10c3abf49..fa991d49c 100644 --- a/solutions/typescript/2019/12/src/p2.spec.ts +++ b/solutions/typescript/2019/12/src/p2.spec.ts @@ -6,16 +6,16 @@ import { p2 } from './p2.js'; describe('2019 - Day 12 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(332_477_126_821_644); + expect(p2(resources.input)).toEqual(332_477_126_821_644); }); it('should be that that the first example resolves to 2772', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(2772); + expect(p2(resources.input)).toEqual(2772); }); it('should be that that the second example resolves to 4686774924', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(4_686_774_924); + expect(p2(resources.input)).toEqual(4_686_774_924); }); }); diff --git a/solutions/typescript/2019/13/src/p1.spec.ts b/solutions/typescript/2019/13/src/p1.spec.ts index 262649b9b..8b8728aa5 100644 --- a/solutions/typescript/2019/13/src/p1.spec.ts +++ b/solutions/typescript/2019/13/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 13 - Part One', () => { it('should resolve to 255 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(255); + expect(p1(resources.input)).toEqual(255); }); }); diff --git a/solutions/typescript/2019/13/src/p2.spec.ts b/solutions/typescript/2019/13/src/p2.spec.ts index 5e5ff585b..c3cbf4ebb 100644 --- a/solutions/typescript/2019/13/src/p2.spec.ts +++ b/solutions/typescript/2019/13/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 13 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(await p2(false)(resources.input)).to.equal(12_338); + expect(await p2(false)(resources.input)).toEqual(12_338); }); }); diff --git a/solutions/typescript/2019/14/src/p1.spec.ts b/solutions/typescript/2019/14/src/p1.spec.ts index 7de3b2811..dc0d8aa13 100644 --- a/solutions/typescript/2019/14/src/p1.spec.ts +++ b/solutions/typescript/2019/14/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2019 - Day 14 - Part One', () => { it('should resolve to 783895 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(783_895); + expect(p1(resources.input)).toEqual(783_895); }); it('should be that that both the first examples resolves to 0', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(31); + expect(p1(resources.input)).toEqual(31); }); }); diff --git a/solutions/typescript/2019/14/src/p2.spec.ts b/solutions/typescript/2019/14/src/p2.spec.ts index d3e2e6dd4..33a894865 100644 --- a/solutions/typescript/2019/14/src/p2.spec.ts +++ b/solutions/typescript/2019/14/src/p2.spec.ts @@ -3,10 +3,10 @@ import { describe, expect, it } from 'vitest'; describe('2019 - Day 14 - Part Two', () => { it('should solve the input', () => { // const input = await read(packageJson.aoc.year, packageJson.aoc.day)(); - expect(0).to.equal(0); + expect(0).toEqual(0); }); it('should be that that the first example resolves to 0', () => { - expect(0).to.equal(0); + expect(0).toEqual(0); }); }); diff --git a/solutions/typescript/2019/16/src/p1.spec.ts b/solutions/typescript/2019/16/src/p1.spec.ts index 76d2f9778..b4b2fae62 100644 --- a/solutions/typescript/2019/16/src/p1.spec.ts +++ b/solutions/typescript/2019/16/src/p1.spec.ts @@ -8,7 +8,7 @@ describe('2019 - Day 16 - Part One', () => { 'should resolve to 30369587 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal('30369587'); + expect(p1(resources.input)).toEqual('30369587'); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2019/16/src/p2.spec.ts b/solutions/typescript/2019/16/src/p2.spec.ts index b9d9c61ef..46a5146a7 100644 --- a/solutions/typescript/2019/16/src/p2.spec.ts +++ b/solutions/typescript/2019/16/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2019 - Day 16 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('09690613'); + expect(p2(resources.input)).toEqual('09690613'); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2019/17/src/p1.spec.ts b/solutions/typescript/2019/17/src/p1.spec.ts index 514a1661a..472b3bc2d 100644 --- a/solutions/typescript/2019/17/src/p1.spec.ts +++ b/solutions/typescript/2019/17/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 17 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(4864); + expect(p1(resources.input)).toEqual(4864); }); }); diff --git a/solutions/typescript/2019/17/src/p2.spec.ts b/solutions/typescript/2019/17/src/p2.spec.ts index 35c4d97ec..c06a3ee34 100644 --- a/solutions/typescript/2019/17/src/p2.spec.ts +++ b/solutions/typescript/2019/17/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 17 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(false)(resources.input)).to.equal(840_248); + expect(p2(false)(resources.input)).toEqual(840_248); }); }); diff --git a/solutions/typescript/2019/18/src/p1.spec.ts b/solutions/typescript/2019/18/src/p1.spec.ts index 8e910a52c..e5808bbd1 100644 --- a/solutions/typescript/2019/18/src/p1.spec.ts +++ b/solutions/typescript/2019/18/src/p1.spec.ts @@ -6,10 +6,10 @@ import { p1 } from './p1.js'; describe('2019 - Day 18 - Part One', () => { it('should resolve to 0 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); it('should be that that both the first examples resolves to 0', () => { - expect(p1('')).to.equal(0); + expect(p1('')).toEqual(0); }); }); diff --git a/solutions/typescript/2019/18/src/p2.spec.ts b/solutions/typescript/2019/18/src/p2.spec.ts index daf97ba1b..d2a80381b 100644 --- a/solutions/typescript/2019/18/src/p2.spec.ts +++ b/solutions/typescript/2019/18/src/p2.spec.ts @@ -6,10 +6,10 @@ import { p2 } from './p2.js'; describe('2019 - Day 18 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(0); + expect(p2(resources.input)).toEqual(0); }); it('should be that that the first example resolves to 0', () => { - expect(p2('0')).to.equal(0); + expect(p2('0')).toEqual(0); }); }); diff --git a/solutions/typescript/2019/19/src/p1.spec.ts b/solutions/typescript/2019/19/src/p1.spec.ts index be231286d..60f79ffd6 100644 --- a/solutions/typescript/2019/19/src/p1.spec.ts +++ b/solutions/typescript/2019/19/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 19 - Part One', () => { it('should resolve to 110 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(110); + expect(p1(resources.input)).toEqual(110); }); }); diff --git a/solutions/typescript/2019/19/src/p2.spec.ts b/solutions/typescript/2019/19/src/p2.spec.ts index 3dedd84a5..274087e16 100644 --- a/solutions/typescript/2019/19/src/p2.spec.ts +++ b/solutions/typescript/2019/19/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2019 - Day 19 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(17_302_065); + expect(p2(resources.input)).toEqual(17_302_065); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2019/20/src/p1.spec.ts b/solutions/typescript/2019/20/src/p1.spec.ts index 874b41229..b9f0a141d 100644 --- a/solutions/typescript/2019/20/src/p1.spec.ts +++ b/solutions/typescript/2019/20/src/p1.spec.ts @@ -6,10 +6,10 @@ import { p1 } from './p1.js'; describe('2019 - Day 20 - Part One', () => { it('should resolve to 0 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); it('should be that that both the first examples resolves to 0', () => { - expect(p1('')).to.equal(0); + expect(p1('')).toEqual(0); }); }); diff --git a/solutions/typescript/2019/20/src/p2.spec.ts b/solutions/typescript/2019/20/src/p2.spec.ts index c97d72a75..8cc56f4b8 100644 --- a/solutions/typescript/2019/20/src/p2.spec.ts +++ b/solutions/typescript/2019/20/src/p2.spec.ts @@ -6,10 +6,10 @@ import { p2 } from './p2.js'; describe('2019 - Day 20 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(0); + expect(p2(resources.input)).toEqual(0); }); it('should be that that the first example resolves to 0', () => { - expect(p2('0')).to.equal(0); + expect(p2('0')).toEqual(0); }); }); diff --git a/solutions/typescript/2019/21/src/p1.spec.ts b/solutions/typescript/2019/21/src/p1.spec.ts index e5254c36d..fc14e5f29 100644 --- a/solutions/typescript/2019/21/src/p1.spec.ts +++ b/solutions/typescript/2019/21/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 21 - Part One', () => { it('should resolve to 19352638 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1()(resources.input)).to.equal(19_352_638); + expect(p1()(resources.input)).toEqual(19_352_638); }); }); diff --git a/solutions/typescript/2019/21/src/p2.spec.ts b/solutions/typescript/2019/21/src/p2.spec.ts index 62263f502..de48b1fe2 100644 --- a/solutions/typescript/2019/21/src/p2.spec.ts +++ b/solutions/typescript/2019/21/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 21 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2()(resources.input)).to.equal(1_141_251_258); + expect(p2()(resources.input)).toEqual(1_141_251_258); }); }); diff --git a/solutions/typescript/2019/22/src/p1.spec.ts b/solutions/typescript/2019/22/src/p1.spec.ts index 1ea1a7c2b..2b53fe507 100644 --- a/solutions/typescript/2019/22/src/p1.spec.ts +++ b/solutions/typescript/2019/22/src/p1.spec.ts @@ -6,26 +6,26 @@ import { p1 } from './p1.js'; describe('2019 - Day 22 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1()(resources.input)).to.equal(6831); + expect(p1()(resources.input)).toEqual(6831); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1()(resources.input)).to.equal(4126); + expect(p1()(resources.input)).toEqual(4126); }); it('should solve for the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1()(resources.input)).to.equal(5922); + expect(p1()(resources.input)).toEqual(5922); }); it('should solve for the third example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1()(resources.input)).to.equal(7115); + expect(p1()(resources.input)).toEqual(7115); }); it('should solve for the fourth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p1()(resources.input)).to.equal(1219); + expect(p1()(resources.input)).toEqual(1219); }); }); diff --git a/solutions/typescript/2019/22/src/p2.spec.ts b/solutions/typescript/2019/22/src/p2.spec.ts index a7f9bfc12..420633280 100644 --- a/solutions/typescript/2019/22/src/p2.spec.ts +++ b/solutions/typescript/2019/22/src/p2.spec.ts @@ -6,26 +6,26 @@ import { p2 } from './p2.js'; describe('2019 - Day 22 - Part Two', () => { it('should resolve to 81781678911487 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2()(resources.input)).to.equal(81_781_678_911_487); + expect(p2()(resources.input)).toEqual(81_781_678_911_487); }); it('should be that that the first example resolves to 104465755608520', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2()(resources.input)).to.equal(104_465_755_608_520); + expect(p2()(resources.input)).toEqual(104_465_755_608_520); }); it('should be that that the second example resolves to 118925585929508', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2()(resources.input)).to.equal(118_925_585_929_508); + expect(p2()(resources.input)).toEqual(118_925_585_929_508); }); it('should be that that the third example resolves to 21734143743040', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2()(resources.input)).to.equal(21_734_143_743_040); + expect(p2()(resources.input)).toEqual(21_734_143_743_040); }); it('should be that that the fourth example resolves to 117607927195067', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p2()(resources.input)).to.equal(117_607_927_195_067); + expect(p2()(resources.input)).toEqual(117_607_927_195_067); }); }); diff --git a/solutions/typescript/2019/23/src/p1.spec.ts b/solutions/typescript/2019/23/src/p1.spec.ts index 3896b5dd3..fa552c359 100644 --- a/solutions/typescript/2019/23/src/p1.spec.ts +++ b/solutions/typescript/2019/23/src/p1.spec.ts @@ -6,6 +6,6 @@ import { p1 } from './p1.js'; describe('2019 - Day 23 - Part One', () => { it('should resolve to 26779 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(26_779); + expect(p1(resources.input)).toEqual(26_779); }); }); diff --git a/solutions/typescript/2019/23/src/p2.spec.ts b/solutions/typescript/2019/23/src/p2.spec.ts index c257f4a84..87494cb47 100644 --- a/solutions/typescript/2019/23/src/p2.spec.ts +++ b/solutions/typescript/2019/23/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2019 - Day 23 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(19_216); + expect(p2(resources.input)).toEqual(19_216); }); }); diff --git a/solutions/typescript/2019/24/src/p1.spec.ts b/solutions/typescript/2019/24/src/p1.spec.ts index f23d08bde..9c43b9796 100644 --- a/solutions/typescript/2019/24/src/p1.spec.ts +++ b/solutions/typescript/2019/24/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2019 - Day 24 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(13_500_447); + expect(p1(resources.input)).toEqual(13_500_447); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(2_129_920); + expect(p1(resources.input)).toEqual(2_129_920); }); }); diff --git a/solutions/typescript/2019/24/src/p2.spec.ts b/solutions/typescript/2019/24/src/p2.spec.ts index c02a3243c..8dc4d13d0 100644 --- a/solutions/typescript/2019/24/src/p2.spec.ts +++ b/solutions/typescript/2019/24/src/p2.spec.ts @@ -8,13 +8,13 @@ describe('2019 - Day 24 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2()(resources.input)).to.equal(2120); + expect(p2()(resources.input)).toEqual(2120); }, { timeout: 20_000 }, ); it('should resolve to 99 when using the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(10)(resources.input)).to.equal(99); + expect(p2(10)(resources.input)).toEqual(99); }); }); diff --git a/solutions/typescript/2020/01/src/p1.spec.ts b/solutions/typescript/2020/01/src/p1.spec.ts index 069caa10e..e7f4e4adf 100644 --- a/solutions/typescript/2020/01/src/p1.spec.ts +++ b/solutions/typescript/2020/01/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 1 - Part One', () => { it('should resolve to 787776 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(787_776); + expect(p1(resources.input)).toEqual(787_776); }); it('should be that that the first example resolves to 514579', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(514_579); + expect(p1(resources.input)).toEqual(514_579); }); }); diff --git a/solutions/typescript/2020/01/src/p2.spec.ts b/solutions/typescript/2020/01/src/p2.spec.ts index 9e9898f3f..4edfd6d93 100644 --- a/solutions/typescript/2020/01/src/p2.spec.ts +++ b/solutions/typescript/2020/01/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 1 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(262_738_554); + expect(p2(resources.input)).toEqual(262_738_554); }); it('should be that that the first example resolves to 241861950', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(241_861_950); + expect(p2(resources.input)).toEqual(241_861_950); }); }); diff --git a/solutions/typescript/2020/02/src/p1.spec.ts b/solutions/typescript/2020/02/src/p1.spec.ts index 693277f1c..be7146928 100644 --- a/solutions/typescript/2020/02/src/p1.spec.ts +++ b/solutions/typescript/2020/02/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 2 - Part One', () => { it('should resolve to 493 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(493); + expect(p1(resources.input)).toEqual(493); }); it('should be that that the first example resolves to 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(2); + expect(p1(resources.input)).toEqual(2); }); }); diff --git a/solutions/typescript/2020/02/src/p2.spec.ts b/solutions/typescript/2020/02/src/p2.spec.ts index 81782c853..a3cccb51c 100644 --- a/solutions/typescript/2020/02/src/p2.spec.ts +++ b/solutions/typescript/2020/02/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 2 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(593); + expect(p2(resources.input)).toEqual(593); }); it('should be that that the first example resolves to 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(1); + expect(p2(resources.input)).toEqual(1); }); }); diff --git a/solutions/typescript/2020/03/src/p1.spec.ts b/solutions/typescript/2020/03/src/p1.spec.ts index eedd6fe62..012569d81 100644 --- a/solutions/typescript/2020/03/src/p1.spec.ts +++ b/solutions/typescript/2020/03/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 3 - Part One', () => { it('should resolve to 265 when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(265); + expect(p1(resources.input)).toEqual(265); }); it('should be that that the first example resolves to 7', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(7); + expect(p1(resources.input)).toEqual(7); }); }); diff --git a/solutions/typescript/2020/03/src/p2.spec.ts b/solutions/typescript/2020/03/src/p2.spec.ts index 8493da913..f91fd027e 100644 --- a/solutions/typescript/2020/03/src/p2.spec.ts +++ b/solutions/typescript/2020/03/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 3 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(3_154_761_400); + expect(p2(resources.input)).toEqual(3_154_761_400); }); it('should be that that the first example resolves to 336', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(336); + expect(p2(resources.input)).toEqual(336); }); }); diff --git a/solutions/typescript/2020/04/src/p1.spec.ts b/solutions/typescript/2020/04/src/p1.spec.ts index fb7f50472..82689afe0 100644 --- a/solutions/typescript/2020/04/src/p1.spec.ts +++ b/solutions/typescript/2020/04/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2020 - Day 4 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(264); + expect(p1(resources.input)).toEqual(264); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(2); + expect(p1(resources.input)).toEqual(2); }); it('should solve for the second input', async () => { const resources = await loadTaskResources(packageJson.aoc, 'input.2.txt'); - expect(p1(resources.input)).to.equal(256); + expect(p1(resources.input)).toEqual(256); }); }); diff --git a/solutions/typescript/2020/04/src/p2.spec.ts b/solutions/typescript/2020/04/src/p2.spec.ts index bc5931b9a..884051f2a 100644 --- a/solutions/typescript/2020/04/src/p2.spec.ts +++ b/solutions/typescript/2020/04/src/p2.spec.ts @@ -6,49 +6,49 @@ import { p2, passportChecks } from './p2.js'; describe('2020 - Day 4 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(224); + expect(p2(resources.input)).toEqual(224); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(2); + expect(p2(resources.input)).toEqual(2); }); it('should solve the all valid example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.valid.txt'); - expect(p2(resources.input)).to.equal(4); + expect(p2(resources.input)).toEqual(4); }); it('should solve the all invalid example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.invalid.txt'); - expect(p2(resources.input)).to.equal(0); + expect(p2(resources.input)).toEqual(0); }); it('should solve for the second input', async () => { const resources = await loadTaskResources(packageJson.aoc, 'input.2.txt'); - expect(p2(resources.input)).to.equal(198); + expect(p2(resources.input)).toEqual(198); }); it('should have a working byr check', () => { - expect(passportChecks.byr('2002')).to.be.true; - expect(passportChecks.byr('2003')).to.be.false; + expect(passportChecks.byr('2002')).toEqual(true); + expect(passportChecks.byr('2003')).toEqual(false); }); it('should have a working hgt check', () => { - expect(passportChecks.hgt('60in')).to.be.true; - expect(passportChecks.hgt('190cm')).to.be.true; - expect(passportChecks.hgt('190in')).to.be.false; - expect(passportChecks.hgt('190')).to.be.false; + expect(passportChecks.hgt('60in')).toEqual(true); + expect(passportChecks.hgt('190cm')).toEqual(true); + expect(passportChecks.hgt('190in')).toEqual(false); + expect(passportChecks.hgt('190')).toEqual(false); }); it('should have a working hcl check', () => { - expect(passportChecks.hcl('#123abc')).to.be.true; - expect(passportChecks.hcl('#123abz')).to.be.false; - expect(passportChecks.hcl('123abc')).to.be.false; + expect(passportChecks.hcl('#123abc')).toEqual(true); + expect(passportChecks.hcl('#123abz')).toEqual(false); + expect(passportChecks.hcl('123abc')).toEqual(false); }); it('should have a working pid check', () => { - expect(passportChecks.pid('000000001')).to.be.true; - expect(passportChecks.pid('0123456789')).to.be.false; + expect(passportChecks.pid('000000001')).toEqual(true); + expect(passportChecks.pid('0123456789')).toEqual(false); }); }); diff --git a/solutions/typescript/2020/05/src/p1.binary.spec.ts b/solutions/typescript/2020/05/src/p1.binary.spec.ts index 50fa36368..a8adecc4c 100644 --- a/solutions/typescript/2020/05/src/p1.binary.spec.ts +++ b/solutions/typescript/2020/05/src/p1.binary.spec.ts @@ -6,22 +6,22 @@ import { calculateSeatId, p1 } from './p1.binary.js'; describe('2020 - Day 5 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(848); + expect(p1(resources.input)).toEqual(848); }); it('should get the seat id of the first example', () => { - expect(calculateSeatId('FBFBBFFRLR')).to.equal(357); + expect(calculateSeatId('FBFBBFFRLR')).toEqual(357); }); it('should get the seat id of the second example', () => { - expect(calculateSeatId('BFFFBBFRRR')).to.equal(567); + expect(calculateSeatId('BFFFBBFRRR')).toEqual(567); }); it('should get the seat id of the third example', () => { - expect(calculateSeatId('FFFBBBFRRR')).to.equal(119); + expect(calculateSeatId('FFFBBBFRRR')).toEqual(119); }); it('should get the seat id of the fourth example', () => { - expect(calculateSeatId('BBFFBBFRLL')).to.equal(820); + expect(calculateSeatId('BBFFBBFRLL')).toEqual(820); }); }); diff --git a/solutions/typescript/2020/05/src/p1.class.spec.ts b/solutions/typescript/2020/05/src/p1.class.spec.ts index d7596d3a9..83f7cb33d 100644 --- a/solutions/typescript/2020/05/src/p1.class.spec.ts +++ b/solutions/typescript/2020/05/src/p1.class.spec.ts @@ -6,22 +6,22 @@ import { calculateSeatId, p1 } from './p1.class.js'; describe('2020 - Day 5 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(848); + expect(p1(resources.input)).toEqual(848); }); it('should get the seat id of the first example', () => { - expect(calculateSeatId('FBFBBFFRLR')).to.equal(357); + expect(calculateSeatId('FBFBBFFRLR')).toEqual(357); }); it('should get the seat id of the second example', () => { - expect(calculateSeatId('BFFFBBFRRR')).to.equal(567); + expect(calculateSeatId('BFFFBBFRRR')).toEqual(567); }); it('should get the seat id of the third example', () => { - expect(calculateSeatId('FFFBBBFRRR')).to.equal(119); + expect(calculateSeatId('FFFBBBFRRR')).toEqual(119); }); it('should get the seat id of the fourth example', () => { - expect(calculateSeatId('BBFFBBFRLL')).to.equal(820); + expect(calculateSeatId('BBFFBBFRLL')).toEqual(820); }); }); diff --git a/solutions/typescript/2020/05/src/p1.spec.ts b/solutions/typescript/2020/05/src/p1.spec.ts index 25f004042..3f29d98b7 100644 --- a/solutions/typescript/2020/05/src/p1.spec.ts +++ b/solutions/typescript/2020/05/src/p1.spec.ts @@ -6,22 +6,22 @@ import { calculateSeatId, p1 } from './p1.js'; describe('2020 - Day 5 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(848); + expect(p1(resources.input)).toEqual(848); }); it('should get the seat id of the first example', () => { - expect(calculateSeatId('FBFBBFFRLR')).to.equal(357); + expect(calculateSeatId('FBFBBFFRLR')).toEqual(357); }); it('should get the seat id of the second example', () => { - expect(calculateSeatId('BFFFBBFRRR')).to.equal(567); + expect(calculateSeatId('BFFFBBFRRR')).toEqual(567); }); it('should get the seat id of the third example', () => { - expect(calculateSeatId('FFFBBBFRRR')).to.equal(119); + expect(calculateSeatId('FFFBBBFRRR')).toEqual(119); }); it('should get the seat id of the fourth example', () => { - expect(calculateSeatId('BBFFBBFRLL')).to.equal(820); + expect(calculateSeatId('BBFFBBFRLL')).toEqual(820); }); }); diff --git a/solutions/typescript/2020/05/src/p2.spec.ts b/solutions/typescript/2020/05/src/p2.spec.ts index aa3459f7f..77eb5d54f 100644 --- a/solutions/typescript/2020/05/src/p2.spec.ts +++ b/solutions/typescript/2020/05/src/p2.spec.ts @@ -6,6 +6,6 @@ import { p2 } from './p2.js'; describe('2020 - Day 5 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(682); + expect(p2(resources.input)).toEqual(682); }); }); diff --git a/solutions/typescript/2020/06/src/p1.spec.ts b/solutions/typescript/2020/06/src/p1.spec.ts index a49d681cc..ec9356ac0 100644 --- a/solutions/typescript/2020/06/src/p1.spec.ts +++ b/solutions/typescript/2020/06/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 6 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(6542); + expect(p1(resources.input)).toEqual(6542); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(11); + expect(p1(resources.input)).toEqual(11); }); }); diff --git a/solutions/typescript/2020/06/src/p2.spec.ts b/solutions/typescript/2020/06/src/p2.spec.ts index 5a62d66c5..88c78067c 100644 --- a/solutions/typescript/2020/06/src/p2.spec.ts +++ b/solutions/typescript/2020/06/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 6 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(3299); + expect(p2(resources.input)).toEqual(3299); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(6); + expect(p2(resources.input)).toEqual(6); }); }); diff --git a/solutions/typescript/2020/07/src/p1.spec.ts b/solutions/typescript/2020/07/src/p1.spec.ts index 9d73d2383..c62687201 100644 --- a/solutions/typescript/2020/07/src/p1.spec.ts +++ b/solutions/typescript/2020/07/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2020 - Day 7 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(197); + expect(p1(resources.input)).toEqual(197); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(4); + expect(p1(resources.input)).toEqual(4); }); it('should solve for the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); }); diff --git a/solutions/typescript/2020/07/src/p2.spec.ts b/solutions/typescript/2020/07/src/p2.spec.ts index a5c6fdd3c..d0488f33c 100644 --- a/solutions/typescript/2020/07/src/p2.spec.ts +++ b/solutions/typescript/2020/07/src/p2.spec.ts @@ -6,16 +6,16 @@ import { p2 } from './p2.js'; describe('2020 - Day 7 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(85_324); + expect(p2(resources.input)).toEqual(85_324); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(32); + expect(p2(resources.input)).toEqual(32); }); it('should solve the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(126); + expect(p2(resources.input)).toEqual(126); }); }); diff --git a/solutions/typescript/2020/09/src/p1.spec.ts b/solutions/typescript/2020/09/src/p1.spec.ts index 8e08f1fde..d4e9528ab 100644 --- a/solutions/typescript/2020/09/src/p1.spec.ts +++ b/solutions/typescript/2020/09/src/p1.spec.ts @@ -9,23 +9,23 @@ describe('2020 - Day 9 - Part One', () => { it('should solve the input', async () => { const { input, args } = await loadTaskResources(packageJson.aoc); - expect(p1(input, args)).to.equal(217_430_975); + expect(p1(input, args)).toEqual(217_430_975); }); it('should solve for the first example', async () => { const { input, args } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input, args)).to.equal(127); + expect(p1(input, args)).toEqual(127); }); it('should find a pair in the preamble that adds to 26', () => - expect(hasComponents(26, preamble)).to.be.true); + expect(hasComponents(26, preamble)).toEqual(true)); it('should find a pair in the preamble that adds to 49', () => - expect(hasComponents(49, preamble)).to.be.true); + expect(hasComponents(49, preamble)).toEqual(true)); it('should not find a pair in the preamble that adds to 100', () => - expect(hasComponents(100, preamble)).to.be.false); + expect(hasComponents(100, preamble)).toEqual(false)); it('should not find a pair in the preamble that adds to 50', () => - expect(hasComponents(50, preamble)).to.be.false); + expect(hasComponents(50, preamble)).toEqual(false)); }); diff --git a/solutions/typescript/2020/09/src/p2.spec.ts b/solutions/typescript/2020/09/src/p2.spec.ts index cd0e34dd7..a75c6812d 100644 --- a/solutions/typescript/2020/09/src/p2.spec.ts +++ b/solutions/typescript/2020/09/src/p2.spec.ts @@ -7,11 +7,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 9 - Part Two', () => { it('should solve the input', async () => { const { input, args } = await loadTaskResources(packageJson.aoc); - expect(p2(input, args)).to.equal(28_509_180); + expect(p2(input, args)).toEqual(28_509_180); }); it('should solve the first example', async () => { const { input, args } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input, args)).to.equal(62); + expect(p2(input, args)).toEqual(62); }); }); diff --git a/solutions/typescript/2020/10/src/p1.spec.ts b/solutions/typescript/2020/10/src/p1.spec.ts index a12d39cf8..967ebd943 100644 --- a/solutions/typescript/2020/10/src/p1.spec.ts +++ b/solutions/typescript/2020/10/src/p1.spec.ts @@ -6,16 +6,16 @@ import { p1 } from './p1.js'; describe('2020 - Day 10 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2201); + expect(p1(resources.input)).toEqual(2201); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(35); + expect(p1(resources.input)).toEqual(35); }); it('should solve for the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(220); + expect(p1(resources.input)).toEqual(220); }); }); diff --git a/solutions/typescript/2020/10/src/p2.memoized.spec.ts b/solutions/typescript/2020/10/src/p2.memoized.spec.ts index 42e3abb96..259dc238b 100644 --- a/solutions/typescript/2020/10/src/p2.memoized.spec.ts +++ b/solutions/typescript/2020/10/src/p2.memoized.spec.ts @@ -6,16 +6,16 @@ import { p2memoized } from './p2.memoized.js'; describe('2020 - Day 10 - Part Two (Memoized)', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2memoized(input)).to.equal(169_255_295_254_528); + expect(p2memoized(input)).toEqual(169_255_295_254_528); }); it('should solve the first example', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2memoized(input)).to.equal(8); + expect(p2memoized(input)).toEqual(8); }); it('should solve the second example', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2memoized(input)).to.equal(19_208); + expect(p2memoized(input)).toEqual(19_208); }); }); diff --git a/solutions/typescript/2020/10/src/p2.spec.ts b/solutions/typescript/2020/10/src/p2.spec.ts index 480f33983..5c1c81f26 100644 --- a/solutions/typescript/2020/10/src/p2.spec.ts +++ b/solutions/typescript/2020/10/src/p2.spec.ts @@ -6,16 +6,16 @@ import { p2 } from './p2.js'; describe('2020 - Day 10 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(169_255_295_254_528); + expect(p2(resources.input)).toEqual(169_255_295_254_528); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(8); + expect(p2(resources.input)).toEqual(8); }); it('should solve the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(19_208); + expect(p2(resources.input)).toEqual(19_208); }); }); diff --git a/solutions/typescript/2020/11/src/p1.spec.ts b/solutions/typescript/2020/11/src/p1.spec.ts index 77077fa79..786672fec 100644 --- a/solutions/typescript/2020/11/src/p1.spec.ts +++ b/solutions/typescript/2020/11/src/p1.spec.ts @@ -8,7 +8,7 @@ describe('2020 - Day 11 - Part One', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2406); + expect(p1(resources.input)).toEqual(2406); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2020 - Day 11 - Part One', () => { 'should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(37); + expect(p1(resources.input)).toEqual(37); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2020/11/src/p2.spec.ts b/solutions/typescript/2020/11/src/p2.spec.ts index 4441922fe..1be1f5675 100644 --- a/solutions/typescript/2020/11/src/p2.spec.ts +++ b/solutions/typescript/2020/11/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2020 - Day 11 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2149); + expect(p2(resources.input)).toEqual(2149); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2020 - Day 11 - Part Two', () => { 'should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(26); + expect(p2(resources.input)).toEqual(26); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2020/12/src/p1.spec.ts b/solutions/typescript/2020/12/src/p1.spec.ts index 80e31e375..403462454 100644 --- a/solutions/typescript/2020/12/src/p1.spec.ts +++ b/solutions/typescript/2020/12/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 12 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(858); + expect(p1(resources.input)).toEqual(858); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(25); + expect(p1(resources.input)).toEqual(25); }); }); diff --git a/solutions/typescript/2020/12/src/p2.spec.ts b/solutions/typescript/2020/12/src/p2.spec.ts index f57a6f583..b40d9eb82 100644 --- a/solutions/typescript/2020/12/src/p2.spec.ts +++ b/solutions/typescript/2020/12/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 12 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(39_140); + expect(p2(resources.input)).toEqual(39_140); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(286); + expect(p2(resources.input)).toEqual(286); }); }); diff --git a/solutions/typescript/2020/13/src/p1.spec.ts b/solutions/typescript/2020/13/src/p1.spec.ts index 4a62e6fb2..e8e1954e1 100644 --- a/solutions/typescript/2020/13/src/p1.spec.ts +++ b/solutions/typescript/2020/13/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 13 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(136); + expect(p1(resources.input)).toEqual(136); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(295); + expect(p1(resources.input)).toEqual(295); }); }); diff --git a/solutions/typescript/2020/13/src/p2.spec.ts b/solutions/typescript/2020/13/src/p2.spec.ts index 98c3e7353..7a2174b73 100644 --- a/solutions/typescript/2020/13/src/p2.spec.ts +++ b/solutions/typescript/2020/13/src/p2.spec.ts @@ -6,35 +6,35 @@ import { p2 } from './p2.js'; describe('2020 - Day 13 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(305_068_317_272_992); + expect(p2(resources.input)).toEqual(305_068_317_272_992); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(1_068_781); + expect(p2(resources.input)).toEqual(1_068_781); }); it('should solve the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(3417); + expect(p2(resources.input)).toEqual(3417); }); it('should solve the third example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2(resources.input)).to.equal(754_018); + expect(p2(resources.input)).toEqual(754_018); }); it('should solve the fourth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p2(resources.input)).to.equal(779_210); + expect(p2(resources.input)).toEqual(779_210); }); it('should solve the fifth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p2(resources.input)).to.equal(1_261_476); + expect(p2(resources.input)).toEqual(1_261_476); }); it('should solve the sixth example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.6.txt'); - expect(p2(resources.input)).to.equal(1_202_161_486); + expect(p2(resources.input)).toEqual(1_202_161_486); }); }); diff --git a/solutions/typescript/2020/14/src/p1.spec.ts b/solutions/typescript/2020/14/src/p1.spec.ts index 3f78f5d8c..58380b1d2 100644 --- a/solutions/typescript/2020/14/src/p1.spec.ts +++ b/solutions/typescript/2020/14/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 14 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(7_440_382_076_205); + expect(p1(resources.input)).toEqual(7_440_382_076_205); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(165); + expect(p1(resources.input)).toEqual(165); }); }); diff --git a/solutions/typescript/2020/14/src/p2.spec.ts b/solutions/typescript/2020/14/src/p2.spec.ts index 1907c0647..7d54fec50 100644 --- a/solutions/typescript/2020/14/src/p2.spec.ts +++ b/solutions/typescript/2020/14/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 14 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(4_200_656_704_538); + expect(p2(resources.input)).toEqual(4_200_656_704_538); }); it('should solve the second example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(208); + expect(p2(resources.input)).toEqual(208); }); }); diff --git a/solutions/typescript/2020/15/src/p1.spec.ts b/solutions/typescript/2020/15/src/p1.spec.ts index b517fbaac..23c05faae 100644 --- a/solutions/typescript/2020/15/src/p1.spec.ts +++ b/solutions/typescript/2020/15/src/p1.spec.ts @@ -6,34 +6,34 @@ import { p1 } from './p1.js'; describe('2020 - Day 15 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1015); + expect(p1(resources.input)).toEqual(1015); }); it('should solve for the first example', () => { - expect(p1('0,3,6')).to.equal(436); + expect(p1('0,3,6')).toEqual(436); }); it('should solve for the second example', () => { - expect(p1('1,3,2')).to.equal(1); + expect(p1('1,3,2')).toEqual(1); }); it('should solve for the third example', () => { - expect(p1('2,1,3')).to.equal(10); + expect(p1('2,1,3')).toEqual(10); }); it('should solve for the fourth example', () => { - expect(p1('1,2,3')).to.equal(27); + expect(p1('1,2,3')).toEqual(27); }); it('should solve for the fifth example', () => { - expect(p1('2,3,1')).to.equal(78); + expect(p1('2,3,1')).toEqual(78); }); it('should solve for the sixth example', () => { - expect(p1('3,2,1')).to.equal(438); + expect(p1('3,2,1')).toEqual(438); }); it('should solve for the seventh example', () => { - expect(p1('3,1,2')).to.equal(1836); + expect(p1('3,1,2')).toEqual(1836); }); }); diff --git a/solutions/typescript/2020/15/src/p2.spec.ts b/solutions/typescript/2020/15/src/p2.spec.ts index 29d7468e9..d62625f29 100644 --- a/solutions/typescript/2020/15/src/p2.spec.ts +++ b/solutions/typescript/2020/15/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2020 - Day 15 - Part Two', () => { 'should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(201); + expect(p2(resources.input)).toEqual(201); }, { timeout: 20_000 }, ); @@ -16,31 +16,31 @@ describe('2020 - Day 15 - Part Two', () => { // ! Disabled example test cases because of long runtime /* it('should solve for the first example', () => { - expect(p2('0,3,6')).to.equal(175594); + expect(p2('0,3,6')).toEqual(175594); }, {timeout: 20000}); it('should solve for the second example', () => { - expect(p2('1,3,2')).to.equal(2578); + expect(p2('1,3,2')).toEqual(2578); }, {timeout: 20000}); it('should solve for the third example', () => { - expect(p2('2,1,3')).to.equal(3544142); + expect(p2('2,1,3')).toEqual(3544142); }, {timeout: 20000}); it('should solve for the fourth example', () => { - expect(p2('1,2,3')).to.equal(261214); + expect(p2('1,2,3')).toEqual(261214); }, {timeout: 20000}); it('should solve for the fifth example', () => { - expect(p2('2,3,1')).to.equal(6895259); + expect(p2('2,3,1')).toEqual(6895259); }, {timeout: 20000}); it('should solve for the sixth example', () => { - expect(p2('3,2,1')).to.equal(18); + expect(p2('3,2,1')).toEqual(18); }, {timeout: 20000}); it('should solve for the seventh example', () => { - expect(p2('3,1,2')).to.equal(362); + expect(p2('3,1,2')).toEqual(362); }, {timeout: 20000}); */ }); diff --git a/solutions/typescript/2020/16/src/p1.spec.ts b/solutions/typescript/2020/16/src/p1.spec.ts index 57ec6c0ed..d02d9a959 100644 --- a/solutions/typescript/2020/16/src/p1.spec.ts +++ b/solutions/typescript/2020/16/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 16 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(27_870); + expect(p1(resources.input)).toEqual(27_870); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(71); + expect(p1(resources.input)).toEqual(71); }); }); diff --git a/solutions/typescript/2020/16/src/p2.spec.ts b/solutions/typescript/2020/16/src/p2.spec.ts index 1c8e35ada..0cc8dbc13 100644 --- a/solutions/typescript/2020/16/src/p2.spec.ts +++ b/solutions/typescript/2020/16/src/p2.spec.ts @@ -6,7 +6,7 @@ import { getMyClarifiedTicket, p2 } from './p2.js'; describe('2020 - Day 16 - Part Two', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(3_173_135_507_987); + expect(p2(input)).toEqual(3_173_135_507_987); }); it('should solve the first example', async () => { @@ -18,6 +18,6 @@ describe('2020 - Day 16 - Part Two', () => { (field.fieldName === 'row' && field.value === 11) || (field.fieldName === 'seat' && field.value === 13), ), - ).to.be.true; + ).toEqual(true); }); }); diff --git a/solutions/typescript/2020/17/src/p1.spec.ts b/solutions/typescript/2020/17/src/p1.spec.ts index bd17f3134..5c87d0b76 100644 --- a/solutions/typescript/2020/17/src/p1.spec.ts +++ b/solutions/typescript/2020/17/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 17 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(304); + expect(p1(resources.input)).toEqual(304); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(112); + expect(p1(resources.input)).toEqual(112); }); }); diff --git a/solutions/typescript/2020/17/src/p2.spec.ts b/solutions/typescript/2020/17/src/p2.spec.ts index 3cf15c02a..ae9ae66da 100644 --- a/solutions/typescript/2020/17/src/p2.spec.ts +++ b/solutions/typescript/2020/17/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2020 - Day 17 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1868); + expect(p2(resources.input)).toEqual(1868); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2020 - Day 17 - Part Two', () => { 'should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(848); + expect(p2(resources.input)).toEqual(848); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2020/18/src/p1.spec.ts b/solutions/typescript/2020/18/src/p1.spec.ts index 40cf8186d..6589f5f93 100644 --- a/solutions/typescript/2020/18/src/p1.spec.ts +++ b/solutions/typescript/2020/18/src/p1.spec.ts @@ -6,36 +6,36 @@ import { p1 } from './p1.js'; describe('2020 - Day 18 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(25_190_263_477_788); + expect(p1(resources.input)).toEqual(25_190_263_477_788); }); it('should solve example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(71); + expect(p1(resources.input)).toEqual(71); }); it('should solve example 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(51); + expect(p1(resources.input)).toEqual(51); }); it('should solve example 3', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(26); + expect(p1(resources.input)).toEqual(26); }); it('should solve example 4', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p1(resources.input)).to.equal(437); + expect(p1(resources.input)).toEqual(437); }); it('should solve example 5', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p1(resources.input)).to.equal(12_240); + expect(p1(resources.input)).toEqual(12_240); }); it('should solve example 6', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.6.txt'); - expect(p1(resources.input)).to.equal(13_632); + expect(p1(resources.input)).toEqual(13_632); }); }); diff --git a/solutions/typescript/2020/18/src/p2.spec.ts b/solutions/typescript/2020/18/src/p2.spec.ts index 642db4c81..7c1f291b9 100644 --- a/solutions/typescript/2020/18/src/p2.spec.ts +++ b/solutions/typescript/2020/18/src/p2.spec.ts @@ -6,36 +6,36 @@ import { p2 } from './p2.js'; describe('2020 - Day 18 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(297_139_939_002_972); + expect(p2(resources.input)).toEqual(297_139_939_002_972); }); it('should solve example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(231); + expect(p2(resources.input)).toEqual(231); }); it('should solve example 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(51); + expect(p2(resources.input)).toEqual(51); }); it('should solve example 3', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2(resources.input)).to.equal(46); + expect(p2(resources.input)).toEqual(46); }); it('should solve example 4', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p2(resources.input)).to.equal(1445); + expect(p2(resources.input)).toEqual(1445); }); it('should solve example 5', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p2(resources.input)).to.equal(669_060); + expect(p2(resources.input)).toEqual(669_060); }); it('should solve example 6', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.6.txt'); - expect(p2(resources.input)).to.equal(23_340); + expect(p2(resources.input)).toEqual(23_340); }); }); diff --git a/solutions/typescript/2020/19/src/p1.spec.ts b/solutions/typescript/2020/19/src/p1.spec.ts index 215b7c933..c94c10f25 100644 --- a/solutions/typescript/2020/19/src/p1.spec.ts +++ b/solutions/typescript/2020/19/src/p1.spec.ts @@ -6,21 +6,21 @@ import { p1 } from './p1.js'; describe('2020 - Day 19 - Part One', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(208); + expect(p1(resources.input)).toEqual(208); }); it('should solve example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(2); + expect(p1(resources.input)).toEqual(2); }); it('should solve example 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(2); + expect(p1(resources.input)).toEqual(2); }); it('should solve example 3', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(3); + expect(p1(resources.input)).toEqual(3); }); }); diff --git a/solutions/typescript/2020/19/src/p2.spec.ts b/solutions/typescript/2020/19/src/p2.spec.ts index 664daf688..3924b33a4 100644 --- a/solutions/typescript/2020/19/src/p2.spec.ts +++ b/solutions/typescript/2020/19/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 19 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(316); + expect(p2(resources.input)).toEqual(316); }); it('should solve example 3', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2(resources.input)).to.equal(12); + expect(p2(resources.input)).toEqual(12); }); }); diff --git a/solutions/typescript/2020/20/src/p1.spec.ts b/solutions/typescript/2020/20/src/p1.spec.ts index 7cc85bb2f..5a1a777bc 100644 --- a/solutions/typescript/2020/20/src/p1.spec.ts +++ b/solutions/typescript/2020/20/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 20 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(22_878_471_088_273); + expect(p1(resources.input)).toEqual(22_878_471_088_273); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(20_899_048_083_289); + expect(p1(resources.input)).toEqual(20_899_048_083_289); }); }); diff --git a/solutions/typescript/2020/20/src/p2.spec.ts b/solutions/typescript/2020/20/src/p2.spec.ts index 0fdae4148..ca1f01dbd 100644 --- a/solutions/typescript/2020/20/src/p2.spec.ts +++ b/solutions/typescript/2020/20/src/p2.spec.ts @@ -7,11 +7,11 @@ import { p2 } from './p2.js'; describe.skip('2020 - Day 20 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1680); + expect(p2(resources.input)).toEqual(1680); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(273); + expect(p2(resources.input)).toEqual(273); }); }); diff --git a/solutions/typescript/2020/21/src/p1.spec.ts b/solutions/typescript/2020/21/src/p1.spec.ts index 6d6ba90d8..8fb5bf425 100644 --- a/solutions/typescript/2020/21/src/p1.spec.ts +++ b/solutions/typescript/2020/21/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 21 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2724); + expect(p1(resources.input)).toEqual(2724); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(5); + expect(p1(resources.input)).toEqual(5); }); }); diff --git a/solutions/typescript/2020/21/src/p2.spec.ts b/solutions/typescript/2020/21/src/p2.spec.ts index db432f1ab..e676efede 100644 --- a/solutions/typescript/2020/21/src/p2.spec.ts +++ b/solutions/typescript/2020/21/src/p2.spec.ts @@ -6,11 +6,11 @@ import { p2 } from './p2.js'; describe('2020 - Day 21 - Part Two', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('xlxknk,cskbmx,cjdmk,bmhn,jrmr,tzxcmr,fmgxh,fxzh'); + expect(p2(resources.input)).toEqual('xlxknk,cskbmx,cjdmk,bmhn,jrmr,tzxcmr,fmgxh,fxzh'); }); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal('mxmxvkd,sqjhc,fvjkl'); + expect(p2(resources.input)).toEqual('mxmxvkd,sqjhc,fvjkl'); }); }); diff --git a/solutions/typescript/2020/22/src/p1.spec.ts b/solutions/typescript/2020/22/src/p1.spec.ts index fa2da4048..ab225cb0a 100644 --- a/solutions/typescript/2020/22/src/p1.spec.ts +++ b/solutions/typescript/2020/22/src/p1.spec.ts @@ -6,11 +6,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 22 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(31_455); + expect(p1(resources.input)).toEqual(31_455); }); it('should solve for example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(306); + expect(p1(resources.input)).toEqual(306); }); }); diff --git a/solutions/typescript/2020/22/src/p2.spec.ts b/solutions/typescript/2020/22/src/p2.spec.ts index 8c34ee1f0..a76683db0 100644 --- a/solutions/typescript/2020/22/src/p2.spec.ts +++ b/solutions/typescript/2020/22/src/p2.spec.ts @@ -8,18 +8,18 @@ describe('2020 - Day 22 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(32_528); + expect(p2(resources.input)).toEqual(32_528); }, { timeout: 20_000 }, ); it('should solve example 1', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(291); + expect(p2(resources.input)).toEqual(291); }); it('should solve example 2', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(19); + expect(p2(resources.input)).toEqual(19); }); }); diff --git a/solutions/typescript/2020/23/src/p1.spec.ts b/solutions/typescript/2020/23/src/p1.spec.ts index bc9ad1c74..5d4a39f52 100644 --- a/solutions/typescript/2020/23/src/p1.spec.ts +++ b/solutions/typescript/2020/23/src/p1.spec.ts @@ -7,33 +7,33 @@ import { p1 } from './p1.js'; describe('2020 - Day 23 - Part One', () => { it('should solve for the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1()(input)).to.equal(74_698_532); + expect(p1()(input)).toEqual(74_698_532); }); it('should solve example 1 using 10 iterations', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(10)(input)).to.equal(92_658_374); + expect(p1(10)(input)).toEqual(92_658_374); }); it('should solve example 1 using the default iteration count', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1()(input)).to.equal(67_384_529); + expect(p1()(input)).toEqual(67_384_529); }); describe('Array', () => { it('should solve for the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1array()(input)).to.equal(74_698_532); + expect(p1array()(input)).toEqual(74_698_532); }); it('should solve example 1 using 10 iterations', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1array(10)(input)).to.equal(92_658_374); + expect(p1array(10)(input)).toEqual(92_658_374); }); it('should solve example 1 using the default iteration count', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1array()(input)).to.equal(67_384_529); + expect(p1array()(input)).toEqual(67_384_529); }); }); }); diff --git a/solutions/typescript/2020/23/src/p2.spec.ts b/solutions/typescript/2020/23/src/p2.spec.ts index dba45363f..20172e800 100644 --- a/solutions/typescript/2020/23/src/p2.spec.ts +++ b/solutions/typescript/2020/23/src/p2.spec.ts @@ -8,7 +8,7 @@ describe('2020 - Day 23 - Part Two', () => { 'should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(286_194_102_744); + expect(p2(input)).toEqual(286_194_102_744); }, { timeout: 20_000 }, ); @@ -17,7 +17,7 @@ describe('2020 - Day 23 - Part Two', () => { 'should solve the example', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(149_245_887_792); + expect(p2(input)).toEqual(149_245_887_792); }, { timeout: 20_000 }, ); diff --git a/solutions/typescript/2020/24/src/p1.spec.ts b/solutions/typescript/2020/24/src/p1.spec.ts index 8f73934fa..70032fc24 100644 --- a/solutions/typescript/2020/24/src/p1.spec.ts +++ b/solutions/typescript/2020/24/src/p1.spec.ts @@ -7,23 +7,23 @@ import { p1 } from './p1.js'; describe('2020 - Day 24 - Part One', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(479); + expect(p1(resources.input)).toEqual(479); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(10); + expect(p1(resources.input)).toEqual(10); }); describe('Graph', () => { it('should solve for the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1g(resources.input)).to.equal(479); + expect(p1g(resources.input)).toEqual(479); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1g(resources.input)).to.equal(10); + expect(p1g(resources.input)).toEqual(10); }); }); }); diff --git a/solutions/typescript/2020/24/src/p2.spec.ts b/solutions/typescript/2020/24/src/p2.spec.ts index d6e14a5ac..f31c6faca 100644 --- a/solutions/typescript/2020/24/src/p2.spec.ts +++ b/solutions/typescript/2020/24/src/p2.spec.ts @@ -8,13 +8,13 @@ describe('2020 - Day 24 - Part Two', () => { 'should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(4135); + expect(p2(resources.input)).toEqual(4135); }, { timeout: 20_000 }, ); it('should solve the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(2208); + expect(p2(resources.input)).toEqual(2208); }); }); diff --git a/solutions/typescript/2020/25/src/p1.spec.ts b/solutions/typescript/2020/25/src/p1.spec.ts index 0a027c10b..02e56bde3 100644 --- a/solutions/typescript/2020/25/src/p1.spec.ts +++ b/solutions/typescript/2020/25/src/p1.spec.ts @@ -5,11 +5,11 @@ import { p1 } from './p1.js'; describe('2020 - Day 25 - Part One', () => { it('should solve for the input', () => { - expect(0).to.equal(0); + expect(0).toEqual(0); }); it('should solve for the first example', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(14_897_079); + expect(p1(resources.input)).toEqual(14_897_079); }); }); diff --git a/solutions/typescript/2020/25/src/p2.spec.ts b/solutions/typescript/2020/25/src/p2.spec.ts index 9df773acf..e461803b6 100644 --- a/solutions/typescript/2020/25/src/p2.spec.ts +++ b/solutions/typescript/2020/25/src/p2.spec.ts @@ -2,10 +2,10 @@ import { describe, expect, it } from 'vitest'; describe('2020 - Day 25 - Part Two', () => { it('should solve the input', () => { - expect(0).to.equal(0); + expect(0).toEqual(0); }); it('should solve the first example', () => { - expect(0).to.equal(0); + expect(0).toEqual(0); }); }); diff --git a/solutions/typescript/2021/01/src/p1.spec.ts b/solutions/typescript/2021/01/src/p1.spec.ts index 5bdd4c488..4396630b7 100644 --- a/solutions/typescript/2021/01/src/p1.spec.ts +++ b/solutions/typescript/2021/01/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 1 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1451); + expect(p1(resources.input)).toEqual(1451); }); describe('example', () => { it('should resolve to 7', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(7); + expect(p1(resources.input)).toEqual(7); }); }); }); diff --git a/solutions/typescript/2021/01/src/p2.spec.ts b/solutions/typescript/2021/01/src/p2.spec.ts index 9b08a6432..648a0c56c 100644 --- a/solutions/typescript/2021/01/src/p2.spec.ts +++ b/solutions/typescript/2021/01/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 1 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1395); + expect(p2(resources.input)).toEqual(1395); }); describe('example', () => { it('should resolve to 5', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(5); + expect(p2(resources.input)).toEqual(5); }); }); }); diff --git a/solutions/typescript/2021/02/src/p1.spec.ts b/solutions/typescript/2021/02/src/p1.spec.ts index 6290731bd..e3acf3157 100644 --- a/solutions/typescript/2021/02/src/p1.spec.ts +++ b/solutions/typescript/2021/02/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 2 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1_882_980); + expect(p1(resources.input)).toEqual(1_882_980); }); describe('example', () => { it('should resolve to 150', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(150); + expect(p1(resources.input)).toEqual(150); }); }); }); diff --git a/solutions/typescript/2021/02/src/p2.spec.ts b/solutions/typescript/2021/02/src/p2.spec.ts index 4b58873ef..5b812ca87 100644 --- a/solutions/typescript/2021/02/src/p2.spec.ts +++ b/solutions/typescript/2021/02/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 2 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1_971_232_560); + expect(p2(resources.input)).toEqual(1_971_232_560); }); describe('example', () => { it('should resolve to 900', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(900); + expect(p2(resources.input)).toEqual(900); }); }); }); diff --git a/solutions/typescript/2021/03/src/p1.spec.ts b/solutions/typescript/2021/03/src/p1.spec.ts index f129ce78e..8a3554c06 100644 --- a/solutions/typescript/2021/03/src/p1.spec.ts +++ b/solutions/typescript/2021/03/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 3 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2_648_450); + expect(p1(resources.input)).toEqual(2_648_450); }); describe('example', () => { it('should resolve to 198', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(198); + expect(p1(resources.input)).toEqual(198); }); }); }); diff --git a/solutions/typescript/2021/03/src/p2.spec.ts b/solutions/typescript/2021/03/src/p2.spec.ts index fe4868ba1..8536a7db9 100644 --- a/solutions/typescript/2021/03/src/p2.spec.ts +++ b/solutions/typescript/2021/03/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 3 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2_845_944); + expect(p2(resources.input)).toEqual(2_845_944); }); describe('example', () => { it('should resolve to 230', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(230); + expect(p2(resources.input)).toEqual(230); }); }); }); diff --git a/solutions/typescript/2021/04/src/p1.spec.ts b/solutions/typescript/2021/04/src/p1.spec.ts index e8b8febff..107625557 100644 --- a/solutions/typescript/2021/04/src/p1.spec.ts +++ b/solutions/typescript/2021/04/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 4 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(10_680); + expect(p1(resources.input)).toEqual(10_680); }); describe('example', () => { it('should resolve to 4512', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(4512); + expect(p1(resources.input)).toEqual(4512); }); }); }); diff --git a/solutions/typescript/2021/04/src/p2.spec.ts b/solutions/typescript/2021/04/src/p2.spec.ts index 18943b8ba..12dda32d3 100644 --- a/solutions/typescript/2021/04/src/p2.spec.ts +++ b/solutions/typescript/2021/04/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 4 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(31_892); + expect(p2(resources.input)).toEqual(31_892); }); describe('example', () => { it('should resolve to 1924', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(1924); + expect(p2(resources.input)).toEqual(1924); }); }); }); diff --git a/solutions/typescript/2021/05/src/p1.spec.ts b/solutions/typescript/2021/05/src/p1.spec.ts index ba8e8d024..3371152b6 100644 --- a/solutions/typescript/2021/05/src/p1.spec.ts +++ b/solutions/typescript/2021/05/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 5 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(7468); + expect(p1(resources.input)).toEqual(7468); }); describe('example', () => { it('should resolve to 5', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(5); + expect(p1(resources.input)).toEqual(5); }); }); }); diff --git a/solutions/typescript/2021/05/src/p2.spec.ts b/solutions/typescript/2021/05/src/p2.spec.ts index 76275267d..34e6fd1e6 100644 --- a/solutions/typescript/2021/05/src/p2.spec.ts +++ b/solutions/typescript/2021/05/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 5 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(22_364); + expect(p2(resources.input)).toEqual(22_364); }); describe('example', () => { it('should resolve to 12', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(12); + expect(p2(resources.input)).toEqual(12); }); }); }); diff --git a/solutions/typescript/2021/06/src/p1.spec.ts b/solutions/typescript/2021/06/src/p1.spec.ts index 99721f828..e7bbc8ad2 100644 --- a/solutions/typescript/2021/06/src/p1.spec.ts +++ b/solutions/typescript/2021/06/src/p1.spec.ts @@ -6,17 +6,17 @@ import { p1 } from './p1.js'; describe('2021 - Day 6 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(361_169); + expect(p1(resources.input)).toEqual(361_169); }); describe('example', () => { it('should resolve to 26 after 18 days', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input, 18)).to.equal(26); + expect(p1(resources.input, 18)).toEqual(26); }); it('should resolve to 5934 after 80 days', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input, 80)).to.equal(5934); + expect(p1(resources.input, 80)).toEqual(5934); }); }); }); diff --git a/solutions/typescript/2021/06/src/p2.spec.ts b/solutions/typescript/2021/06/src/p2.spec.ts index d0b67615f..7e0f2c8e5 100644 --- a/solutions/typescript/2021/06/src/p2.spec.ts +++ b/solutions/typescript/2021/06/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 6 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1_634_946_868_992); + expect(p2(resources.input)).toEqual(1_634_946_868_992); }); describe('example', () => { it('should resolve to 26984457539', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(26_984_457_539); + expect(p2(resources.input)).toEqual(26_984_457_539); }); }); }); diff --git a/solutions/typescript/2021/07/src/p1.spec.ts b/solutions/typescript/2021/07/src/p1.spec.ts index eabe481f2..ad16b5b28 100644 --- a/solutions/typescript/2021/07/src/p1.spec.ts +++ b/solutions/typescript/2021/07/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 7 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(325_528); + expect(p1(resources.input)).toEqual(325_528); }); describe('example', () => { it('should resolve to 37', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(37); + expect(p1(resources.input)).toEqual(37); }); }); }); diff --git a/solutions/typescript/2021/07/src/p2.spec.ts b/solutions/typescript/2021/07/src/p2.spec.ts index 3f34206f3..38c2330d2 100644 --- a/solutions/typescript/2021/07/src/p2.spec.ts +++ b/solutions/typescript/2021/07/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 7 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(85_015_836); + expect(p2(resources.input)).toEqual(85_015_836); }); describe('example', () => { it('should resolve to 168', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(168); + expect(p2(resources.input)).toEqual(168); }); }); }); diff --git a/solutions/typescript/2021/08/src/p1.spec.ts b/solutions/typescript/2021/08/src/p1.spec.ts index d1de21978..cb70d7d66 100644 --- a/solutions/typescript/2021/08/src/p1.spec.ts +++ b/solutions/typescript/2021/08/src/p1.spec.ts @@ -6,20 +6,20 @@ import { p1 } from './p1.js'; describe('2021 - Day 8 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(473); + expect(p1(resources.input)).toEqual(473); }); describe('example 1', () => { it('should resolve to 0', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); }); describe('example 2', () => { it('should resolve to 26', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(26); + expect(p1(resources.input)).toEqual(26); }); }); }); diff --git a/solutions/typescript/2021/08/src/p2.spec.ts b/solutions/typescript/2021/08/src/p2.spec.ts index 2f233ae8f..72f113f77 100644 --- a/solutions/typescript/2021/08/src/p2.spec.ts +++ b/solutions/typescript/2021/08/src/p2.spec.ts @@ -6,20 +6,20 @@ import { p2 } from './p2.js'; describe('2021 - Day 8 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1_097_568); + expect(p2(resources.input)).toEqual(1_097_568); }); describe('example 1', () => { it('should resolve to 5353', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(5353); + expect(p2(resources.input)).toEqual(5353); }); }); describe('example 2', () => { it('should resolve to 61229', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(61_229); + expect(p2(resources.input)).toEqual(61_229); }); }); }); diff --git a/solutions/typescript/2021/09/src/p1.spec.ts b/solutions/typescript/2021/09/src/p1.spec.ts index 033443826..fd6e2fa0a 100644 --- a/solutions/typescript/2021/09/src/p1.spec.ts +++ b/solutions/typescript/2021/09/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 9 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(456); + expect(p1(resources.input)).toEqual(456); }); describe('example 1', () => { it('should resolve to 15', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(15); + expect(p1(resources.input)).toEqual(15); }); }); }); diff --git a/solutions/typescript/2021/09/src/p2.spec.ts b/solutions/typescript/2021/09/src/p2.spec.ts index 5714a4ce2..7aec371c0 100644 --- a/solutions/typescript/2021/09/src/p2.spec.ts +++ b/solutions/typescript/2021/09/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 9 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(1_047_744); + expect(p2(resources.input)).toEqual(1_047_744); }); describe('example 1', () => { it('should resolve to 1134', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(1134); + expect(p2(resources.input)).toEqual(1134); }); }); }); diff --git a/solutions/typescript/2021/10/src/p1.spec.ts b/solutions/typescript/2021/10/src/p1.spec.ts index ca577f06a..2ea5b178b 100644 --- a/solutions/typescript/2021/10/src/p1.spec.ts +++ b/solutions/typescript/2021/10/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 10 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(193_275); + expect(p1(resources.input)).toEqual(193_275); }); describe('example 1', () => { it('should resolve to 26397', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(26_397); + expect(p1(resources.input)).toEqual(26_397); }); }); }); diff --git a/solutions/typescript/2021/10/src/p2.spec.ts b/solutions/typescript/2021/10/src/p2.spec.ts index 961ca41d1..93a11394e 100644 --- a/solutions/typescript/2021/10/src/p2.spec.ts +++ b/solutions/typescript/2021/10/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 10 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2_429_644_557); + expect(p2(resources.input)).toEqual(2_429_644_557); }); describe('example 1', () => { it('should resolve to 288957', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(288_957); + expect(p2(resources.input)).toEqual(288_957); }); }); }); diff --git a/solutions/typescript/2021/11/src/p1.spec.ts b/solutions/typescript/2021/11/src/p1.spec.ts index fb7b099b1..c8c09d172 100644 --- a/solutions/typescript/2021/11/src/p1.spec.ts +++ b/solutions/typescript/2021/11/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 11 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1669); + expect(p1(resources.input)).toEqual(1669); }); describe('example 1', () => { it('should resolve to 1656', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(1656); + expect(p1(resources.input)).toEqual(1656); }); }); }); diff --git a/solutions/typescript/2021/11/src/p2.spec.ts b/solutions/typescript/2021/11/src/p2.spec.ts index c0577b606..a9be569ec 100644 --- a/solutions/typescript/2021/11/src/p2.spec.ts +++ b/solutions/typescript/2021/11/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 11 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(351); + expect(p2(resources.input)).toEqual(351); }); describe('example 1', () => { it('should resolve to 195', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(195); + expect(p2(resources.input)).toEqual(195); }); }); }); diff --git a/solutions/typescript/2021/12/src/p1.spec.ts b/solutions/typescript/2021/12/src/p1.spec.ts index fb5093e40..59808fbed 100644 --- a/solutions/typescript/2021/12/src/p1.spec.ts +++ b/solutions/typescript/2021/12/src/p1.spec.ts @@ -6,27 +6,27 @@ import { p1 } from './p1.js'; describe('2021 - Day 12 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(4167); + expect(p1(resources.input)).toEqual(4167); }); describe('example 1', () => { it('should resolve to 10', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(10); + expect(p1(resources.input)).toEqual(10); }); }); describe('example 2', () => { it('should resolve to 19', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(19); + expect(p1(resources.input)).toEqual(19); }); }); describe('example 3', () => { it('should resolve to 226', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(226); + expect(p1(resources.input)).toEqual(226); }); }); }); diff --git a/solutions/typescript/2021/12/src/p2.spec.ts b/solutions/typescript/2021/12/src/p2.spec.ts index b12eeaa10..feffc13d1 100644 --- a/solutions/typescript/2021/12/src/p2.spec.ts +++ b/solutions/typescript/2021/12/src/p2.spec.ts @@ -7,27 +7,27 @@ describe('2021 - Day 12 - Part Two', () => { it.skip('should resolve when using the input', async () => { // ? Disabled as it runs for a long time const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(98_441); + expect(p2(resources.input)).toEqual(98_441); }); describe('example 1', () => { it('should resolve to 36', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(36); + expect(p2(resources.input)).toEqual(36); }); }); describe('example 2', () => { it('should resolve to 103', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(103); + expect(p2(resources.input)).toEqual(103); }); }); describe('example 3', () => { it('should resolve to 3509', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2(resources.input)).to.equal(3509); + expect(p2(resources.input)).toEqual(3509); }); }); }); diff --git a/solutions/typescript/2021/13/src/p1.spec.ts b/solutions/typescript/2021/13/src/p1.spec.ts index 2d70e1ed4..9d3e8eff4 100644 --- a/solutions/typescript/2021/13/src/p1.spec.ts +++ b/solutions/typescript/2021/13/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 13 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(775); + expect(p1(resources.input)).toEqual(775); }); describe('example 1', () => { it('should resolve to 17', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(17); + expect(p1(resources.input)).toEqual(17); }); }); }); diff --git a/solutions/typescript/2021/13/src/p2.spec.ts b/solutions/typescript/2021/13/src/p2.spec.ts index 1fd91bf5d..5183a4b7d 100644 --- a/solutions/typescript/2021/13/src/p2.spec.ts +++ b/solutions/typescript/2021/13/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 13 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal('REUPUPKR'); + expect(p2(resources.input)).toEqual('REUPUPKR'); }); describe('example 1', () => { it('should resolve to 36', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(`\ + expect(p2(resources.input)).toEqual(`\ ##### #...# #...# diff --git a/solutions/typescript/2021/14/src/p1.spec.ts b/solutions/typescript/2021/14/src/p1.spec.ts index 24cda45b2..951e7e2f2 100644 --- a/solutions/typescript/2021/14/src/p1.spec.ts +++ b/solutions/typescript/2021/14/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 14 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(2703); + expect(p1(resources.input)).toEqual(2703); }); describe('example 1', () => { it('should resolve to 1588', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(1588); + expect(p1(resources.input)).toEqual(1588); }); }); }); diff --git a/solutions/typescript/2021/14/src/p2.spec.ts b/solutions/typescript/2021/14/src/p2.spec.ts index 6dcfb96c8..f9493248a 100644 --- a/solutions/typescript/2021/14/src/p2.spec.ts +++ b/solutions/typescript/2021/14/src/p2.spec.ts @@ -6,13 +6,13 @@ import { p2 } from './p2.js'; describe('2021 - Day 14 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2_984_946_368_465); + expect(p2(resources.input)).toEqual(2_984_946_368_465); }); describe('example 1', () => { it('should resolve to 2188189693529', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(2_188_189_693_529); + expect(p2(resources.input)).toEqual(2_188_189_693_529); }); }); }); diff --git a/solutions/typescript/2021/15/src/p1.spec.ts b/solutions/typescript/2021/15/src/p1.spec.ts index 15b40a7bb..d7c1c946e 100644 --- a/solutions/typescript/2021/15/src/p1.spec.ts +++ b/solutions/typescript/2021/15/src/p1.spec.ts @@ -6,13 +6,13 @@ import { p1 } from './p1.js'; describe('2021 - Day 15 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(609); + expect(p1(resources.input)).toEqual(609); }); describe('example 1', () => { it('should resolve to 40', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(40); + expect(p1(resources.input)).toEqual(40); }); }); }); diff --git a/solutions/typescript/2021/15/src/p2.spec.ts b/solutions/typescript/2021/15/src/p2.spec.ts index 30e20414e..78b6f97a7 100644 --- a/solutions/typescript/2021/15/src/p2.spec.ts +++ b/solutions/typescript/2021/15/src/p2.spec.ts @@ -7,13 +7,13 @@ describe('2021 - Day 15 - Part Two', () => { it.skip('should resolve when using the input', async () => { // Runs too long const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(2925); + expect(p2(resources.input)).toEqual(2925); }); describe('example 1', () => { it('should resolve to 315', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(resources.input)).to.equal(315); + expect(p2(resources.input)).toEqual(315); }); }); }); diff --git a/solutions/typescript/2021/16/src/p1.spec.ts b/solutions/typescript/2021/16/src/p1.spec.ts index 53f7a6501..65d954a5a 100644 --- a/solutions/typescript/2021/16/src/p1.spec.ts +++ b/solutions/typescript/2021/16/src/p1.spec.ts @@ -6,96 +6,96 @@ import { p1 } from './p1.js'; describe('2021 - Day 16 - Part One', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(920); + expect(p1(resources.input)).toEqual(920); }); describe('D2FE28', () => { it('should resolve to 6', () => { - expect(p1('D2FE28')).to.equal(6); + expect(p1('D2FE28')).toEqual(6); }); }); describe('38006F45291200', () => { it('should resolve to 9', () => { - expect(p1('38006F45291200')).to.equal(9); + expect(p1('38006F45291200')).toEqual(9); }); }); describe('EE00D40C823060', () => { it('should resolve to 14', () => { - expect(p1('EE00D40C823060')).to.equal(14); + expect(p1('EE00D40C823060')).toEqual(14); }); }); describe('8A004A801A8002F478', () => { it('should resolve to 16', () => { - expect(p1('8A004A801A8002F478')).to.equal(16); + expect(p1('8A004A801A8002F478')).toEqual(16); }); }); describe('620080001611562C8802118E34', () => { it('should resolve to 12', () => { - expect(p1('620080001611562C8802118E34')).to.equal(12); + expect(p1('620080001611562C8802118E34')).toEqual(12); }); }); describe('C0015000016115A2E0802F182340', () => { it('should resolve to 23', () => { - expect(p1('C0015000016115A2E0802F182340')).to.equal(23); + expect(p1('C0015000016115A2E0802F182340')).toEqual(23); }); }); describe('A0016C880162017C3686B18A3D4780', () => { it('should resolve to 31', () => { - expect(p1('A0016C880162017C3686B18A3D4780')).to.equal(31); + expect(p1('A0016C880162017C3686B18A3D4780')).toEqual(31); }); }); describe('C200B40A82', () => { it('should resolve to 14', () => { - expect(p1('C200B40A82')).to.equal(14); + expect(p1('C200B40A82')).toEqual(14); }); }); describe('04005AC33890', () => { it('should resolve to 8', () => { - expect(p1('04005AC33890')).to.equal(8); + expect(p1('04005AC33890')).toEqual(8); }); }); describe('880086C3E88112', () => { it('should resolve to 15', () => { - expect(p1('880086C3E88112')).to.equal(15); + expect(p1('880086C3E88112')).toEqual(15); }); }); describe('CE00C43D881120', () => { it('should resolve to 11', () => { - expect(p1('CE00C43D881120')).to.equal(11); + expect(p1('CE00C43D881120')).toEqual(11); }); }); describe('D8005AC2A8F0', () => { it('should resolve to 13', () => { - expect(p1('D8005AC2A8F0')).to.equal(13); + expect(p1('D8005AC2A8F0')).toEqual(13); }); }); describe('F600BC2D8F', () => { it('should resolve to 19', () => { - expect(p1('F600BC2D8F')).to.equal(19); + expect(p1('F600BC2D8F')).toEqual(19); }); }); describe('9C005AC2F8F0', () => { it('should resolve to 16', () => { - expect(p1('9C005AC2F8F0')).to.equal(16); + expect(p1('9C005AC2F8F0')).toEqual(16); }); }); describe('9C0141080250320F1802104A08', () => { it('should resolve to 20', () => { - expect(p1('9C0141080250320F1802104A08')).to.equal(20); + expect(p1('9C0141080250320F1802104A08')).toEqual(20); }); }); }); diff --git a/solutions/typescript/2021/16/src/p2.spec.ts b/solutions/typescript/2021/16/src/p2.spec.ts index 8bbd4969b..423d17615 100644 --- a/solutions/typescript/2021/16/src/p2.spec.ts +++ b/solutions/typescript/2021/16/src/p2.spec.ts @@ -6,96 +6,96 @@ import { p2 } from './p2.js'; describe('2021 - Day 16 - Part Two', () => { it('should resolve when using the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p2(resources.input)).to.equal(10_185_143_721_112); + expect(p2(resources.input)).toEqual(10_185_143_721_112); }); describe('D2FE28', () => { it('should resolve to 2021', () => { - expect(p2('D2FE28')).to.equal(2021); + expect(p2('D2FE28')).toEqual(2021); }); }); describe('38006F45291200', () => { it('should resolve to 1', () => { - expect(p2('38006F45291200')).to.equal(1); + expect(p2('38006F45291200')).toEqual(1); }); }); describe('EE00D40C823060', () => { it('should resolve to 3', () => { - expect(p2('EE00D40C823060')).to.equal(3); + expect(p2('EE00D40C823060')).toEqual(3); }); }); describe('8A004A801A8002F478', () => { it('should resolve to 15', () => { - expect(p2('8A004A801A8002F478')).to.equal(15); + expect(p2('8A004A801A8002F478')).toEqual(15); }); }); describe('620080001611562C8802118E34', () => { it('should resolve to 46', () => { - expect(p2('620080001611562C8802118E34')).to.equal(46); + expect(p2('620080001611562C8802118E34')).toEqual(46); }); }); describe('C0015000016115A2E0802F182340', () => { it('should resolve to 46', () => { - expect(p2('C0015000016115A2E0802F182340')).to.equal(46); + expect(p2('C0015000016115A2E0802F182340')).toEqual(46); }); }); describe('A0016C880162017C3686B18A3D4780', () => { it('should resolve to 54', () => { - expect(p2('A0016C880162017C3686B18A3D4780')).to.equal(54); + expect(p2('A0016C880162017C3686B18A3D4780')).toEqual(54); }); }); describe('C200B40A82', () => { it('should resolve to 3', () => { - expect(p2('C200B40A82')).to.equal(3); + expect(p2('C200B40A82')).toEqual(3); }); }); describe('04005AC33890', () => { it('should resolve to 54', () => { - expect(p2('04005AC33890')).to.equal(54); + expect(p2('04005AC33890')).toEqual(54); }); }); describe('880086C3E88112', () => { it('should resolve to 7', () => { - expect(p2('880086C3E88112')).to.equal(7); + expect(p2('880086C3E88112')).toEqual(7); }); }); describe('CE00C43D881120', () => { it('should resolve to 9', () => { - expect(p2('CE00C43D881120')).to.equal(9); + expect(p2('CE00C43D881120')).toEqual(9); }); }); describe('D8005AC2A8F0', () => { it('should resolve to 1', () => { - expect(p2('D8005AC2A8F0')).to.equal(1); + expect(p2('D8005AC2A8F0')).toEqual(1); }); }); describe('F600BC2D8F', () => { it('should resolve to 0', () => { - expect(p2('F600BC2D8F')).to.equal(0); + expect(p2('F600BC2D8F')).toEqual(0); }); }); describe('9C005AC2F8F0', () => { it('should resolve to 0', () => { - expect(p2('9C005AC2F8F0')).to.equal(0); + expect(p2('9C005AC2F8F0')).toEqual(0); }); }); describe('9C0141080250320F1802104A08', () => { it('should resolve to 1', () => { - expect(p2('9C0141080250320F1802104A08')).to.equal(1); + expect(p2('9C0141080250320F1802104A08')).toEqual(1); }); }); }); diff --git a/solutions/typescript/2021/17/src/p1.spec.ts b/solutions/typescript/2021/17/src/p1.spec.ts index 8e3b457a3..8e34cbf1b 100644 --- a/solutions/typescript/2021/17/src/p1.spec.ts +++ b/solutions/typescript/2021/17/src/p1.spec.ts @@ -7,7 +7,7 @@ describe('2021 - Day 17 - Part One', () => { describe('the input', () => { it('should resolve to 3202 ', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(5995); + expect(p1(input)).toEqual(5995); }); }); @@ -15,7 +15,7 @@ describe('2021 - Day 17 - Part One', () => { const input = 'target area: x=20..30, y=-10..-5'; it('should resolve to 45', () => { - expect(p1(input)).to.equal(45); + expect(p1(input)).toEqual(45); }); }); }); diff --git a/solutions/typescript/2021/17/src/p2.spec.ts b/solutions/typescript/2021/17/src/p2.spec.ts index ceb3d47a7..b0a6f3962 100644 --- a/solutions/typescript/2021/17/src/p2.spec.ts +++ b/solutions/typescript/2021/17/src/p2.spec.ts @@ -7,7 +7,7 @@ describe('2021 - Day 17 - Part Two', () => { describe('the input', () => { it('should resolve to 3202 ', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(3202); + expect(p2(input)).toEqual(3202); }); }); @@ -15,7 +15,7 @@ describe('2021 - Day 17 - Part Two', () => { const input = 'target area: x=20..30, y=-10..-5'; it('should resolve to 112', () => { - expect(p2(input)).to.equal(112); + expect(p2(input)).toEqual(112); }); }); }); diff --git a/solutions/typescript/2021/18/src/model/snailfish-number.spec.ts b/solutions/typescript/2021/18/src/model/snailfish-number.spec.ts index faf56cf4f..575090497 100644 --- a/solutions/typescript/2021/18/src/model/snailfish-number.spec.ts +++ b/solutions/typescript/2021/18/src/model/snailfish-number.spec.ts @@ -12,34 +12,34 @@ describe('snailfish numbers', () => { describe('magnitude', () => { it('should be 143 for [[1,2],[[3,4],5]]', () => { const number = parseSnailfishNumber('[[1,2],[[3,4],5]]'); - expect(getMagnitude(number)).to.equal(143); + expect(getMagnitude(number)).toEqual(143); }); it('should be 1384 for [[[[0,7],4],[[7,8],[6,0]]],[8,1]]', () => { const number = parseSnailfishNumber('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); - expect(getMagnitude(number)).to.equal(1384); + expect(getMagnitude(number)).toEqual(1384); }); it('should be 445 for [[[[1,1],[2,2]],[3,3]],[4,4]]', () => { const number = parseSnailfishNumber('[[[[1,1],[2,2]],[3,3]],[4,4]]'); - expect(getMagnitude(number)).to.equal(445); + expect(getMagnitude(number)).toEqual(445); }); it('should be 791 for [[[[3,0],[5,3]],[4,4]],[5,5]]', () => { const number = parseSnailfishNumber('[[[[3,0],[5,3]],[4,4]],[5,5]]'); - expect(getMagnitude(number)).to.equal(791); + expect(getMagnitude(number)).toEqual(791); }); it('should be 1137 for [[[[5,0],[7,4]],[5,5]],[6,6]]', () => { const number = parseSnailfishNumber('[[[[5,0],[7,4]],[5,5]],[6,6]]'); - expect(getMagnitude(number)).to.equal(1137); + expect(getMagnitude(number)).toEqual(1137); }); it('should be 3488 for [[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', () => { const number = parseSnailfishNumber( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); - expect(getMagnitude(number)).to.equal(3488); + expect(getMagnitude(number)).toEqual(3488); }); it('should be 4140 for the last example', () => { @@ -56,10 +56,10 @@ describe('snailfish numbers', () => { '[[[[5,2],5],[8,[3,7]]],[[5,[7,5]],[4,4]]]', ].map((number) => parseSnailfishNumber(number)); const sum = addSnailfishNumbers(...numbers); - expect(sum.toString()).to.equal( + expect(sum.toString()).toEqual( '[[[[6,6],[7,6]],[[7,7],[7,0]]],[[[7,7],[7,7]],[[7,8],[9,9]]]]', ); - expect(getMagnitude(sum)).to.equal(4140); + expect(getMagnitude(sum)).toEqual(4140); }); }); @@ -70,7 +70,7 @@ describe('snailfish numbers', () => { it('should work in a set order', () => { const result = addSnailfishNumbers(a, b); - expect(result.toString()).to.equal('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); + expect(result.toString()).toEqual('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); }); }); @@ -98,7 +98,7 @@ describe('snailfish numbers', () => { simpleNumber3, simpleNumber4, ); - expect(result.toString()).to.equal('[[[[1,1],[2,2]],[3,3]],[4,4]]'); + expect(result.toString()).toEqual('[[[[1,1],[2,2]],[3,3]],[4,4]]'); }); it('should be able to add up the first 5', () => { @@ -109,7 +109,7 @@ describe('snailfish numbers', () => { simpleNumber4, simpleNumber5, ); - expect(result.toString()).to.equal('[[[[3,0],[5,3]],[4,4]],[5,5]]'); + expect(result.toString()).toEqual('[[[[3,0],[5,3]],[4,4]],[5,5]]'); }); it('should be able to add up all 6 of them', () => { @@ -121,7 +121,7 @@ describe('snailfish numbers', () => { simpleNumber5, simpleNumber6, ); - expect(result.toString()).to.equal('[[[[5,0],[7,4]],[5,5]],[6,6]]'); + expect(result.toString()).toEqual('[[[[5,0],[7,4]],[5,5]],[6,6]]'); }); }); @@ -133,7 +133,7 @@ describe('snailfish numbers', () => { const secondNumber = parseSnailfishNumber('[7,[[[3,7],[4,3]],[[6,3],[8,8]]]]'); const result = addSnailfishNumbers(firstNumber, secondNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[4,0],[5,4]],[[7,7],[6,0]]],[[8,[7,7]],[[7,9],[5,0]]]]', ); }); @@ -146,7 +146,7 @@ describe('snailfish numbers', () => { '[[2,[[0,8],[3,4]]],[[[6,7],1],[7,[1,6]]]]', ); const result = addSnailfishNumbers(previousResult, thirdNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,7],[6,7]],[[7,7],[0,7]]],[[[8,7],[7,7]],[[8,8],[8,0]]]]', ); }); @@ -159,7 +159,7 @@ describe('snailfish numbers', () => { '[[[[2,4],7],[6,[0,5]]],[[[6,8],[2,8]],[[2,1],[4,5]]]]', ); const result = addSnailfishNumbers(previousResult, fourthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,0],[7,7]],[[7,7],[7,8]]],[[[7,7],[8,8]],[[7,7],[8,7]]]]', ); }); @@ -170,7 +170,7 @@ describe('snailfish numbers', () => { ); const fifthNumber = parseSnailfishNumber('[7,[5,[[3,8],[1,4]]]]'); const result = addSnailfishNumbers(previousResult, fifthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,7],[7,8]],[[9,5],[8,7]]],[[[6,8],[0,8]],[[9,9],[9,0]]]]', ); }); @@ -181,7 +181,7 @@ describe('snailfish numbers', () => { ); const sixthNumber = parseSnailfishNumber('[[2,[2,2]],[8,[8,1]]]'); const result = addSnailfishNumbers(previousResult, sixthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,6],[6,6]],[[6,0],[6,7]]],[[[7,7],[8,9]],[8,[8,1]]]]', ); }); @@ -192,7 +192,7 @@ describe('snailfish numbers', () => { ); const seventhNumber = parseSnailfishNumber('[2,9]'); const result = addSnailfishNumbers(previousResult, seventhNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,6],[7,7]],[[0,7],[7,7]]],[[[5,5],[5,6]],9]]', ); }); @@ -203,7 +203,7 @@ describe('snailfish numbers', () => { ); const eighthNumber = parseSnailfishNumber('[1,[[[9,3],9],[[9,0],[0,7]]]]'); const result = addSnailfishNumbers(previousResult, eighthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,8],[6,7]],[[6,8],[0,8]]],[[[7,7],[5,0]],[[5,5],[5,6]]]]', ); }); @@ -214,7 +214,7 @@ describe('snailfish numbers', () => { ); const ninthNumber = parseSnailfishNumber('[[[5,[7,4]],7],1]'); const result = addSnailfishNumbers(previousResult, ninthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,7],[7,7]],[[8,7],[8,7]]],[[[7,0],[7,7]],9]]', ); }); @@ -225,7 +225,7 @@ describe('snailfish numbers', () => { ); const ninthNumber = parseSnailfishNumber('[[[[4,2],2],6],[8,7]]'); const result = addSnailfishNumbers(previousResult, ninthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); }); @@ -244,7 +244,7 @@ describe('snailfish numbers', () => { '[[[[4,2],2],6],[8,7]]', ].map((number) => parseSnailfishNumber(number)); const result = addSnailfishNumbers(...numbers); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); }); @@ -255,42 +255,42 @@ describe('snailfish numbers', () => { it('should explode [[[[[9,8],1],2],3],4] into [[[[0,9],2],3],4]', () => { const number = parseSnailfishNumber('[[[[[9,8],1],2],3],4]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[[[0,9],2],3],4]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[[[0,9],2],3],4]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [7,[6,[5,[4,[3,2]]]]] into [7,[6,[5,[7,0]]]]', () => { const number = parseSnailfishNumber('[7,[6,[5,[4,[3,2]]]]]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[7,[6,[5,[7,0]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[7,[6,[5,[7,0]]]]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [[6,[5,[4,[3,2]]]],1] into [[6,[5,[7,0]]],3]', () => { const number = parseSnailfishNumber('[[6,[5,[4,[3,2]]]],1]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[6,[5,[7,0]]],3]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[6,[5,[7,0]]],3]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [[3,[2,[1,[7,3]]]],[6,[5,[4,[3,2]]]]] into [[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]', () => { const number = parseSnailfishNumber('[[3,[2,[1,[7,3]]]],[6,[5,[4,[3,2]]]]]'); const exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); }); it('should explode [[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]] into [[3,[2,[8,0]]],[9,[5,[7,0]]]]', () => { const number = parseSnailfishNumber('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); const exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[3,[2,[8,0]]],[9,[5,[7,0]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[3,[2,[8,0]]],[9,[5,[7,0]]]]'); }); }); }); diff --git a/solutions/typescript/2021/18/src/p1.spec.ts b/solutions/typescript/2021/18/src/p1.spec.ts index 68bfa5ec7..f326d77d0 100644 --- a/solutions/typescript/2021/18/src/p1.spec.ts +++ b/solutions/typescript/2021/18/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2021 - Day 18 - Part One', () => { describe('the input', () => { it('should resolve to 4184', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(4184); + expect(p1(input)).toEqual(4184); }); }); describe('example 1', () => { it('should resolve to 4140', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(4140); + expect(p1(input)).toEqual(4140); }); }); }); diff --git a/solutions/typescript/2021/18/src/p2.spec.ts b/solutions/typescript/2021/18/src/p2.spec.ts index 52175a0da..904df60f9 100644 --- a/solutions/typescript/2021/18/src/p2.spec.ts +++ b/solutions/typescript/2021/18/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2021 - Day 18 - Part Two', () => { describe('the input', () => { it('should resolve to 4731 ', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(4731); + expect(p2(input)).toEqual(4731); }); }); describe('example 1', () => { it('should resolve to 3993', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(3993); + expect(p2(input)).toEqual(3993); }); }); }); diff --git a/solutions/typescript/2021/21/src/model/snailfish-number.spec.ts b/solutions/typescript/2021/21/src/model/snailfish-number.spec.ts index faf56cf4f..90fc052ba 100644 --- a/solutions/typescript/2021/21/src/model/snailfish-number.spec.ts +++ b/solutions/typescript/2021/21/src/model/snailfish-number.spec.ts @@ -1,45 +1,45 @@ import { PairTree } from '@alexaegis/advent-of-code-lib/model'; import { beforeEach, describe, expect, it } from 'vitest'; import { - addSnailfishNumbers, - getMagnitude, - parseSnailfishNumber, - triggerExplosion, - type SnailfishNumber, + addSnailfishNumbers, + getMagnitude, + parseSnailfishNumber, + triggerExplosion, + type SnailfishNumber, } from './snailfish-number.js'; describe('snailfish numbers', () => { describe('magnitude', () => { it('should be 143 for [[1,2],[[3,4],5]]', () => { const number = parseSnailfishNumber('[[1,2],[[3,4],5]]'); - expect(getMagnitude(number)).to.equal(143); + expect(getMagnitude(number)).toEqual(143); }); it('should be 1384 for [[[[0,7],4],[[7,8],[6,0]]],[8,1]]', () => { const number = parseSnailfishNumber('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); - expect(getMagnitude(number)).to.equal(1384); + expect(getMagnitude(number)).toEqual(1384); }); it('should be 445 for [[[[1,1],[2,2]],[3,3]],[4,4]]', () => { const number = parseSnailfishNumber('[[[[1,1],[2,2]],[3,3]],[4,4]]'); - expect(getMagnitude(number)).to.equal(445); + expect(getMagnitude(number)).toEqual(445); }); it('should be 791 for [[[[3,0],[5,3]],[4,4]],[5,5]]', () => { const number = parseSnailfishNumber('[[[[3,0],[5,3]],[4,4]],[5,5]]'); - expect(getMagnitude(number)).to.equal(791); + expect(getMagnitude(number)).toEqual(791); }); it('should be 1137 for [[[[5,0],[7,4]],[5,5]],[6,6]]', () => { const number = parseSnailfishNumber('[[[[5,0],[7,4]],[5,5]],[6,6]]'); - expect(getMagnitude(number)).to.equal(1137); + expect(getMagnitude(number)).toEqual(1137); }); it('should be 3488 for [[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', () => { const number = parseSnailfishNumber( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); - expect(getMagnitude(number)).to.equal(3488); + expect(getMagnitude(number)).toEqual(3488); }); it('should be 4140 for the last example', () => { @@ -56,10 +56,10 @@ describe('snailfish numbers', () => { '[[[[5,2],5],[8,[3,7]]],[[5,[7,5]],[4,4]]]', ].map((number) => parseSnailfishNumber(number)); const sum = addSnailfishNumbers(...numbers); - expect(sum.toString()).to.equal( + expect(sum.toString()).toEqual( '[[[[6,6],[7,6]],[[7,7],[7,0]]],[[[7,7],[7,7]],[[7,8],[9,9]]]]', ); - expect(getMagnitude(sum)).to.equal(4140); + expect(getMagnitude(sum)).toEqual(4140); }); }); @@ -70,7 +70,7 @@ describe('snailfish numbers', () => { it('should work in a set order', () => { const result = addSnailfishNumbers(a, b); - expect(result.toString()).to.equal('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); + expect(result.toString()).toEqual('[[[[0,7],4],[[7,8],[6,0]]],[8,1]]'); }); }); @@ -98,7 +98,7 @@ describe('snailfish numbers', () => { simpleNumber3, simpleNumber4, ); - expect(result.toString()).to.equal('[[[[1,1],[2,2]],[3,3]],[4,4]]'); + expect(result.toString()).toEqual('[[[[1,1],[2,2]],[3,3]],[4,4]]'); }); it('should be able to add up the first 5', () => { @@ -109,7 +109,7 @@ describe('snailfish numbers', () => { simpleNumber4, simpleNumber5, ); - expect(result.toString()).to.equal('[[[[3,0],[5,3]],[4,4]],[5,5]]'); + expect(result.toString()).toEqual('[[[[3,0],[5,3]],[4,4]],[5,5]]'); }); it('should be able to add up all 6 of them', () => { @@ -121,7 +121,7 @@ describe('snailfish numbers', () => { simpleNumber5, simpleNumber6, ); - expect(result.toString()).to.equal('[[[[5,0],[7,4]],[5,5]],[6,6]]'); + expect(result.toString()).toEqual('[[[[5,0],[7,4]],[5,5]],[6,6]]'); }); }); @@ -133,7 +133,7 @@ describe('snailfish numbers', () => { const secondNumber = parseSnailfishNumber('[7,[[[3,7],[4,3]],[[6,3],[8,8]]]]'); const result = addSnailfishNumbers(firstNumber, secondNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[4,0],[5,4]],[[7,7],[6,0]]],[[8,[7,7]],[[7,9],[5,0]]]]', ); }); @@ -146,7 +146,7 @@ describe('snailfish numbers', () => { '[[2,[[0,8],[3,4]]],[[[6,7],1],[7,[1,6]]]]', ); const result = addSnailfishNumbers(previousResult, thirdNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,7],[6,7]],[[7,7],[0,7]]],[[[8,7],[7,7]],[[8,8],[8,0]]]]', ); }); @@ -159,7 +159,7 @@ describe('snailfish numbers', () => { '[[[[2,4],7],[6,[0,5]]],[[[6,8],[2,8]],[[2,1],[4,5]]]]', ); const result = addSnailfishNumbers(previousResult, fourthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,0],[7,7]],[[7,7],[7,8]]],[[[7,7],[8,8]],[[7,7],[8,7]]]]', ); }); @@ -170,7 +170,7 @@ describe('snailfish numbers', () => { ); const fifthNumber = parseSnailfishNumber('[7,[5,[[3,8],[1,4]]]]'); const result = addSnailfishNumbers(previousResult, fifthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,7],[7,8]],[[9,5],[8,7]]],[[[6,8],[0,8]],[[9,9],[9,0]]]]', ); }); @@ -181,7 +181,7 @@ describe('snailfish numbers', () => { ); const sixthNumber = parseSnailfishNumber('[[2,[2,2]],[8,[8,1]]]'); const result = addSnailfishNumbers(previousResult, sixthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,6],[6,6]],[[6,0],[6,7]]],[[[7,7],[8,9]],[8,[8,1]]]]', ); }); @@ -192,7 +192,7 @@ describe('snailfish numbers', () => { ); const seventhNumber = parseSnailfishNumber('[2,9]'); const result = addSnailfishNumbers(previousResult, seventhNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[6,6],[7,7]],[[0,7],[7,7]]],[[[5,5],[5,6]],9]]', ); }); @@ -203,7 +203,7 @@ describe('snailfish numbers', () => { ); const eighthNumber = parseSnailfishNumber('[1,[[[9,3],9],[[9,0],[0,7]]]]'); const result = addSnailfishNumbers(previousResult, eighthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,8],[6,7]],[[6,8],[0,8]]],[[[7,7],[5,0]],[[5,5],[5,6]]]]', ); }); @@ -214,7 +214,7 @@ describe('snailfish numbers', () => { ); const ninthNumber = parseSnailfishNumber('[[[5,[7,4]],7],1]'); const result = addSnailfishNumbers(previousResult, ninthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[7,7],[7,7]],[[8,7],[8,7]]],[[[7,0],[7,7]],9]]', ); }); @@ -225,7 +225,7 @@ describe('snailfish numbers', () => { ); const ninthNumber = parseSnailfishNumber('[[[[4,2],2],6],[8,7]]'); const result = addSnailfishNumbers(previousResult, ninthNumber); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); }); @@ -244,7 +244,7 @@ describe('snailfish numbers', () => { '[[[[4,2],2],6],[8,7]]', ].map((number) => parseSnailfishNumber(number)); const result = addSnailfishNumbers(...numbers); - expect(result.toString()).to.equal( + expect(result.toString()).toEqual( '[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]', ); }); @@ -255,42 +255,42 @@ describe('snailfish numbers', () => { it('should explode [[[[[9,8],1],2],3],4] into [[[[0,9],2],3],4]', () => { const number = parseSnailfishNumber('[[[[[9,8],1],2],3],4]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[[[0,9],2],3],4]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[[[0,9],2],3],4]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [7,[6,[5,[4,[3,2]]]]] into [7,[6,[5,[7,0]]]]', () => { const number = parseSnailfishNumber('[7,[6,[5,[4,[3,2]]]]]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[7,[6,[5,[7,0]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[7,[6,[5,[7,0]]]]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [[6,[5,[4,[3,2]]]],1] into [[6,[5,[7,0]]],3]', () => { const number = parseSnailfishNumber('[[6,[5,[4,[3,2]]]],1]'); let exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[6,[5,[7,0]]],3]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[6,[5,[7,0]]],3]'); exploded = triggerExplosion(number); - expect(exploded).to.be.false; + expect(exploded).toEqual(false); }); it('should explode [[3,[2,[1,[7,3]]]],[6,[5,[4,[3,2]]]]] into [[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]', () => { const number = parseSnailfishNumber('[[3,[2,[1,[7,3]]]],[6,[5,[4,[3,2]]]]]'); const exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); }); it('should explode [[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]] into [[3,[2,[8,0]]],[9,[5,[7,0]]]]', () => { const number = parseSnailfishNumber('[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]'); const exploded = triggerExplosion(number); - expect(exploded).to.be.true; - expect(number.toString()).to.equal('[[3,[2,[8,0]]],[9,[5,[7,0]]]]'); + expect(exploded).toEqual(true); + expect(number.toString()).toEqual('[[3,[2,[8,0]]],[9,[5,[7,0]]]]'); }); }); }); diff --git a/solutions/typescript/2021/21/src/p1.spec.ts b/solutions/typescript/2021/21/src/p1.spec.ts index eb2bacf99..2ab1feca2 100644 --- a/solutions/typescript/2021/21/src/p1.spec.ts +++ b/solutions/typescript/2021/21/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2021 - Day 18 - Part One', () => { describe('the input', () => { it('should resolve to 752745', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(752_745); + expect(p1(input)).toEqual(752_745); }); }); describe('example 1', () => { it('should resolve to 739785', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(739_785); + expect(p1(input)).toEqual(739_785); }); }); }); diff --git a/solutions/typescript/2021/21/src/p2.spec.ts b/solutions/typescript/2021/21/src/p2.spec.ts index 25362dfc1..c386d5b0b 100644 --- a/solutions/typescript/2021/21/src/p2.spec.ts +++ b/solutions/typescript/2021/21/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2021 - Day 21 - Part Two', () => { describe('the input', () => { it('should resolve to 309196008717909', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(309_196_008_717_909); + expect(p2(input)).toEqual(309_196_008_717_909); }); }); describe('example 1', () => { it('should resolve to 444356092776315', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(444_356_092_776_315); + expect(p2(input)).toEqual(444_356_092_776_315); }); }); }); diff --git a/solutions/typescript/2022/01/src/p1.spec.ts b/solutions/typescript/2022/01/src/p1.spec.ts index ee40d7f21..acc650dc0 100644 --- a/solutions/typescript/2022/01/src/p1.spec.ts +++ b/solutions/typescript/2022/01/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 01 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(67_450); + expect(p1(resources.input)).toEqual(67_450); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(24_000); + expect(p1(resources.input)).toEqual(24_000); }); }); }); diff --git a/solutions/typescript/2022/01/src/p2.spec.ts b/solutions/typescript/2022/01/src/p2.spec.ts index c622bd496..df467b66e 100644 --- a/solutions/typescript/2022/01/src/p2.spec.ts +++ b/solutions/typescript/2022/01/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 01 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(199_357); + expect(p2(input)).toEqual(199_357); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(45_000); + expect(p2(input)).toEqual(45_000); }); }); }); diff --git a/solutions/typescript/2022/02/src/p1.spec.ts b/solutions/typescript/2022/02/src/p1.spec.ts index 8e52359b9..a7172268c 100644 --- a/solutions/typescript/2022/02/src/p1.spec.ts +++ b/solutions/typescript/2022/02/src/p1.spec.ts @@ -7,21 +7,21 @@ describe('2022 02 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(11_063); + expect(p1(resources.input)).toEqual(11_063); }); }); describe('input 2', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc, 'input.2.txt'); - expect(p1(resources.input)).to.equal(9651); + expect(p1(resources.input)).toEqual(9651); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(15); + expect(p1(resources.input)).toEqual(15); }); }); }); diff --git a/solutions/typescript/2022/02/src/p2.spec.ts b/solutions/typescript/2022/02/src/p2.spec.ts index 5b4ea4974..7b6d2f939 100644 --- a/solutions/typescript/2022/02/src/p2.spec.ts +++ b/solutions/typescript/2022/02/src/p2.spec.ts @@ -7,21 +7,21 @@ describe('2022 02 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(10_349); + expect(p2(input)).toEqual(10_349); }); }); describe('input 2', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc, 'input.2.txt'); - expect(p2(resources.input)).to.equal(10_560); + expect(p2(resources.input)).toEqual(10_560); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(12); + expect(p2(input)).toEqual(12); }); }); }); diff --git a/solutions/typescript/2022/03/src/p1.spec.ts b/solutions/typescript/2022/03/src/p1.spec.ts index bd222c9b8..40e74bf81 100644 --- a/solutions/typescript/2022/03/src/p1.spec.ts +++ b/solutions/typescript/2022/03/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 03 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(8053); + expect(p1(resources.input)).toEqual(8053); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(157); + expect(p1(resources.input)).toEqual(157); }); }); }); diff --git a/solutions/typescript/2022/03/src/p2.spec.ts b/solutions/typescript/2022/03/src/p2.spec.ts index f27fe812c..26fb4325f 100644 --- a/solutions/typescript/2022/03/src/p2.spec.ts +++ b/solutions/typescript/2022/03/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 03 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(2425); + expect(p2(input)).toEqual(2425); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(70); + expect(p2(input)).toEqual(70); }); }); }); diff --git a/solutions/typescript/2022/04/src/p1.spec.ts b/solutions/typescript/2022/04/src/p1.spec.ts index 0e42fc144..e99eaa32c 100644 --- a/solutions/typescript/2022/04/src/p1.spec.ts +++ b/solutions/typescript/2022/04/src/p1.spec.ts @@ -7,48 +7,48 @@ describe('2022 04 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(433); + expect(p1(resources.input)).toEqual(433); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(2); + expect(p1(resources.input)).toEqual(2); }); }); describe('isFullyOverlapping', () => { it('should be true when the second is fully inside the first', () => { - expect(areClosedRangesFullyOverlapping([2, 8], [3, 7])).to.be.true; + expect(areClosedRangesFullyOverlapping([2, 8], [3, 7])).toEqual(true); }); it('should be true when the first is fully inside the second', () => { - expect(areClosedRangesFullyOverlapping([4, 6], [3, 7])).to.be.true; + expect(areClosedRangesFullyOverlapping([4, 6], [3, 7])).toEqual(true); }); it('should be true when the first is the same as the second', () => { - expect(areClosedRangesFullyOverlapping([4, 6], [4, 6])).to.be.true; + expect(areClosedRangesFullyOverlapping([4, 6], [4, 6])).toEqual(true); }); it('should be true when the only one side is the same as in the other', () => { - expect(areClosedRangesFullyOverlapping([4, 7], [4, 6])).to.be.true; + expect(areClosedRangesFullyOverlapping([4, 7], [4, 6])).toEqual(true); }); it('should be true when every value is the same', () => { - expect(areClosedRangesFullyOverlapping([1, 1], [1, 1])).to.be.true; + expect(areClosedRangesFullyOverlapping([1, 1], [1, 1])).toEqual(true); }); it('should be true when the first range has one element', () => { - expect(areClosedRangesFullyOverlapping([1, 1], [1, 5])).to.be.true; + expect(areClosedRangesFullyOverlapping([1, 1], [1, 5])).toEqual(true); }); it('should be false when they are not overlapping at all', () => { - expect(areClosedRangesFullyOverlapping([1, 2], [3, 4])).to.be.false; + expect(areClosedRangesFullyOverlapping([1, 2], [3, 4])).toEqual(false); }); it('should be false when they are only partially overlapping', () => { - expect(areClosedRangesFullyOverlapping([1, 5], [3, 8])).to.be.false; + expect(areClosedRangesFullyOverlapping([1, 5], [3, 8])).toEqual(false); }); }); }); diff --git a/solutions/typescript/2022/04/src/p2.spec.ts b/solutions/typescript/2022/04/src/p2.spec.ts index 68868871f..185d51918 100644 --- a/solutions/typescript/2022/04/src/p2.spec.ts +++ b/solutions/typescript/2022/04/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 04 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(852); + expect(p2(input)).toEqual(852); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(4); + expect(p2(input)).toEqual(4); }); }); diff --git a/solutions/typescript/2022/05/src/p1.spec.ts b/solutions/typescript/2022/05/src/p1.spec.ts index 8b495723a..4cdd1cc55 100644 --- a/solutions/typescript/2022/05/src/p1.spec.ts +++ b/solutions/typescript/2022/05/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 05 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal('MQTPGLLDN'); + expect(p1(resources.input)).toEqual('MQTPGLLDN'); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal('CMZ'); + expect(p1(resources.input)).toEqual('CMZ'); }); }); }); diff --git a/solutions/typescript/2022/05/src/p2.spec.ts b/solutions/typescript/2022/05/src/p2.spec.ts index 34d9cd660..e5ec6f6c6 100644 --- a/solutions/typescript/2022/05/src/p2.spec.ts +++ b/solutions/typescript/2022/05/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 05 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal('LVZPSTTCZ'); + expect(p2(input)).toEqual('LVZPSTTCZ'); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal('MCD'); + expect(p2(input)).toEqual('MCD'); }); }); }); diff --git a/solutions/typescript/2022/06/src/p1.spec.ts b/solutions/typescript/2022/06/src/p1.spec.ts index 7590f3c9a..c02a7af68 100644 --- a/solutions/typescript/2022/06/src/p1.spec.ts +++ b/solutions/typescript/2022/06/src/p1.spec.ts @@ -7,42 +7,42 @@ describe('2022 06 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1876); + expect(p1(resources.input)).toEqual(1876); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(7); + expect(p1(resources.input)).toEqual(7); }); }); describe('example 2', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(5); + expect(p1(resources.input)).toEqual(5); }); }); describe('example 3', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p1(resources.input)).to.equal(6); + expect(p1(resources.input)).toEqual(6); }); }); describe('example 4', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p1(resources.input)).to.equal(10); + expect(p1(resources.input)).toEqual(10); }); }); describe('example 5', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p1(resources.input)).to.equal(11); + expect(p1(resources.input)).toEqual(11); }); }); }); diff --git a/solutions/typescript/2022/06/src/p2.spec.ts b/solutions/typescript/2022/06/src/p2.spec.ts index b3eb8ff8f..323d6268b 100644 --- a/solutions/typescript/2022/06/src/p2.spec.ts +++ b/solutions/typescript/2022/06/src/p2.spec.ts @@ -7,42 +7,42 @@ describe('2022 06 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(2202); + expect(p2(input)).toEqual(2202); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(19); + expect(p2(input)).toEqual(19); }); }); describe('example 2', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(23); + expect(p2(resources.input)).toEqual(23); }); }); describe('example 3', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.3.txt'); - expect(p2(resources.input)).to.equal(23); + expect(p2(resources.input)).toEqual(23); }); }); describe('example 4', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.4.txt'); - expect(p2(resources.input)).to.equal(29); + expect(p2(resources.input)).toEqual(29); }); }); describe('example 5', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.5.txt'); - expect(p2(resources.input)).to.equal(26); + expect(p2(resources.input)).toEqual(26); }); }); }); diff --git a/solutions/typescript/2022/07/src/p1.spec.ts b/solutions/typescript/2022/07/src/p1.spec.ts index 43cdd15ab..b8917ea93 100644 --- a/solutions/typescript/2022/07/src/p1.spec.ts +++ b/solutions/typescript/2022/07/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 07 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1_743_217); + expect(p1(resources.input)).toEqual(1_743_217); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(95_437); + expect(p1(resources.input)).toEqual(95_437); }); }); }); diff --git a/solutions/typescript/2022/07/src/p2.spec.ts b/solutions/typescript/2022/07/src/p2.spec.ts index 3a7dd4cf7..6ef34f558 100644 --- a/solutions/typescript/2022/07/src/p2.spec.ts +++ b/solutions/typescript/2022/07/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 07 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(8_319_096); + expect(p2(input)).toEqual(8_319_096); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(24_933_642); + expect(p2(input)).toEqual(24_933_642); }); }); }); diff --git a/solutions/typescript/2022/08/src/p1.spec.ts b/solutions/typescript/2022/08/src/p1.spec.ts index a0acc3918..516e138b3 100644 --- a/solutions/typescript/2022/08/src/p1.spec.ts +++ b/solutions/typescript/2022/08/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 08 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(1779); + expect(p1(resources.input)).toEqual(1779); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(21); + expect(p1(resources.input)).toEqual(21); }); }); }); diff --git a/solutions/typescript/2022/08/src/p2.spec.ts b/solutions/typescript/2022/08/src/p2.spec.ts index b15f9ccdf..fbe2f5958 100644 --- a/solutions/typescript/2022/08/src/p2.spec.ts +++ b/solutions/typescript/2022/08/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 08 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(172_224); + expect(p2(input)).toEqual(172_224); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(8); + expect(p2(input)).toEqual(8); }); }); }); diff --git a/solutions/typescript/2022/09/src/p1.spec.ts b/solutions/typescript/2022/09/src/p1.spec.ts index 8068d4ef8..38bf0f39f 100644 --- a/solutions/typescript/2022/09/src/p1.spec.ts +++ b/solutions/typescript/2022/09/src/p1.spec.ts @@ -7,21 +7,21 @@ describe('2022 09 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(6023); + expect(p1(resources.input)).toEqual(6023); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(13); + expect(p1(resources.input)).toEqual(13); }); }); describe('example 2', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(88); + expect(p1(resources.input)).toEqual(88); }); }); }); diff --git a/solutions/typescript/2022/09/src/p2.spec.ts b/solutions/typescript/2022/09/src/p2.spec.ts index 5dbf0ed68..f632d84b0 100644 --- a/solutions/typescript/2022/09/src/p2.spec.ts +++ b/solutions/typescript/2022/09/src/p2.spec.ts @@ -7,21 +7,21 @@ describe('2022 09 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(2533); + expect(p2(input)).toEqual(2533); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(1); + expect(p2(input)).toEqual(1); }); }); describe('example 2', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(resources.input)).to.equal(36); + expect(p2(resources.input)).toEqual(36); }); }); }); diff --git a/solutions/typescript/2022/10/src/p1.spec.ts b/solutions/typescript/2022/10/src/p1.spec.ts index 944905016..fa41abc21 100644 --- a/solutions/typescript/2022/10/src/p1.spec.ts +++ b/solutions/typescript/2022/10/src/p1.spec.ts @@ -7,21 +7,21 @@ describe('2022 10 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(11_780); + expect(p1(resources.input)).toEqual(11_780); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); }); describe('example 2', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p1(resources.input)).to.equal(13_140); + expect(p1(resources.input)).toEqual(13_140); }); }); }); diff --git a/solutions/typescript/2022/10/src/p2.spec.ts b/solutions/typescript/2022/10/src/p2.spec.ts index b0da3af9a..b07dd39ac 100644 --- a/solutions/typescript/2022/10/src/p2.spec.ts +++ b/solutions/typescript/2022/10/src/p2.spec.ts @@ -8,14 +8,14 @@ describe('2022 10 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(parseLetterMatrix(stringToMatrix(p2(input)))).to.equal('PZULBAUA'); + expect(parseLetterMatrix(stringToMatrix(p2(input)))).toEqual('PZULBAUA'); }); }); describe('example 2', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.2.txt'); - expect(p2(input)).to.equal(`\ + expect(p2(input)).toEqual(`\ ##..##..##..##..##..##..##..##..##..##.. ###...###...###...###...###...###...###. ####....####....####....####....####.... diff --git a/solutions/typescript/2022/11/src/p1.spec.ts b/solutions/typescript/2022/11/src/p1.spec.ts index 4274808d5..a6fd5d4bc 100644 --- a/solutions/typescript/2022/11/src/p1.spec.ts +++ b/solutions/typescript/2022/11/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 11 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(108_240); + expect(p1(input)).toEqual(108_240); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(10_605); + expect(p1(input)).toEqual(10_605); }); }); }); diff --git a/solutions/typescript/2022/11/src/p2.spec.ts b/solutions/typescript/2022/11/src/p2.spec.ts index 2a578e6d6..57453ed3f 100644 --- a/solutions/typescript/2022/11/src/p2.spec.ts +++ b/solutions/typescript/2022/11/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 11 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(25_712_998_901); + expect(p2(input)).toEqual(25_712_998_901); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(2_713_310_158); + expect(p2(input)).toEqual(2_713_310_158); }); }); }); diff --git a/solutions/typescript/2022/12/src/p1.spec.ts b/solutions/typescript/2022/12/src/p1.spec.ts index d4500101d..e8f12c91d 100644 --- a/solutions/typescript/2022/12/src/p1.spec.ts +++ b/solutions/typescript/2022/12/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 12 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(534); + expect(p1(input)).toEqual(534); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(31); + expect(p1(input)).toEqual(31); }); }); }); diff --git a/solutions/typescript/2022/12/src/p2.spec.ts b/solutions/typescript/2022/12/src/p2.spec.ts index 6c631d29d..dd847bf33 100644 --- a/solutions/typescript/2022/12/src/p2.spec.ts +++ b/solutions/typescript/2022/12/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 12 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(525); + expect(p2(input)).toEqual(525); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(29); + expect(p2(input)).toEqual(29); }); }); }); diff --git a/solutions/typescript/2022/13/src/p1.spec.ts b/solutions/typescript/2022/13/src/p1.spec.ts index f49e31209..ec0f9fcb3 100644 --- a/solutions/typescript/2022/13/src/p1.spec.ts +++ b/solutions/typescript/2022/13/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 13 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(6369); + expect(p1(input)).toEqual(6369); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(13); + expect(p1(input)).toEqual(13); }); }); }); diff --git a/solutions/typescript/2022/13/src/p2.spec.ts b/solutions/typescript/2022/13/src/p2.spec.ts index a54277ffe..047f1f5b2 100644 --- a/solutions/typescript/2022/13/src/p2.spec.ts +++ b/solutions/typescript/2022/13/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 13 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(25_800); + expect(p2(input)).toEqual(25_800); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(140); + expect(p2(input)).toEqual(140); }); }); }); diff --git a/solutions/typescript/2022/14/src/p1.spec.ts b/solutions/typescript/2022/14/src/p1.spec.ts index 8545abe96..06871db3d 100644 --- a/solutions/typescript/2022/14/src/p1.spec.ts +++ b/solutions/typescript/2022/14/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 14 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(await p1(input)).to.equal(665); + expect(await p1(input)).toEqual(665); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(await p1(input)).to.equal(24); + expect(await p1(input)).toEqual(24); }); }); }); diff --git a/solutions/typescript/2022/14/src/p2.spec.ts b/solutions/typescript/2022/14/src/p2.spec.ts index db0acc089..52dd48136 100644 --- a/solutions/typescript/2022/14/src/p2.spec.ts +++ b/solutions/typescript/2022/14/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 14 p2', () => { describe.skip('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(await p2(input)).to.equal(25_434); + expect(await p2(input)).toEqual(25_434); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(await p2(input)).to.equal(93); + expect(await p2(input)).toEqual(93); }); }); }); diff --git a/solutions/typescript/2022/15/src/p1.spec.ts b/solutions/typescript/2022/15/src/p1.spec.ts index 07b132822..5adbb5a89 100644 --- a/solutions/typescript/2022/15/src/p1.spec.ts +++ b/solutions/typescript/2022/15/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 15 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input, args } = await loadTaskResources(packageJson.aoc); - expect(p1(input, args)).to.equal(5_127_797); + expect(p1(input, args)).toEqual(5_127_797); }); }); describe('example 1', () => { it('should be solved', async () => { const { input, args } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input, args)).to.equal(26); + expect(p1(input, args)).toEqual(26); }); }); }); diff --git a/solutions/typescript/2022/15/src/p2.spec.ts b/solutions/typescript/2022/15/src/p2.spec.ts index e69afea85..e32f46bd0 100644 --- a/solutions/typescript/2022/15/src/p2.spec.ts +++ b/solutions/typescript/2022/15/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 15 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(12_518_502_636_475); + expect(p2(input)).toEqual(12_518_502_636_475); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(56_000_011); + expect(p2(input)).toEqual(56_000_011); }); }); }); diff --git a/solutions/typescript/2022/16/src/p1.spec.ts b/solutions/typescript/2022/16/src/p1.spec.ts index 86e2c646c..1647a460e 100644 --- a/solutions/typescript/2022/16/src/p1.spec.ts +++ b/solutions/typescript/2022/16/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 16 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(1580); + expect(p1(input)).toEqual(1580); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(1651); + expect(p1(input)).toEqual(1651); }); }); }); diff --git a/solutions/typescript/2022/16/src/p2.spec.ts b/solutions/typescript/2022/16/src/p2.spec.ts index bc218a52b..0d7119e79 100644 --- a/solutions/typescript/2022/16/src/p2.spec.ts +++ b/solutions/typescript/2022/16/src/p2.spec.ts @@ -7,14 +7,14 @@ describe.skip('2022 16 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/17/src/p1.spec.ts b/solutions/typescript/2022/17/src/p1.spec.ts index 8f2b22663..1c5b57aee 100644 --- a/solutions/typescript/2022/17/src/p1.spec.ts +++ b/solutions/typescript/2022/17/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 17 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(await p1(input)).to.equal(3085); + expect(await p1(input)).toEqual(3085); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(await p1(input)).to.equal(3068); + expect(await p1(input)).toEqual(3068); }); }); }); diff --git a/solutions/typescript/2022/17/src/p2.spec.ts b/solutions/typescript/2022/17/src/p2.spec.ts index 0e5c0c27a..156d6d30d 100644 --- a/solutions/typescript/2022/17/src/p2.spec.ts +++ b/solutions/typescript/2022/17/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 17 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/18/src/p1.spec.ts b/solutions/typescript/2022/18/src/p1.spec.ts index 733fd1c13..62b08bb64 100644 --- a/solutions/typescript/2022/18/src/p1.spec.ts +++ b/solutions/typescript/2022/18/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 18 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(3454); + expect(p1(input)).toEqual(3454); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(64); + expect(p1(input)).toEqual(64); }); }); }); diff --git a/solutions/typescript/2022/18/src/p2.spec.ts b/solutions/typescript/2022/18/src/p2.spec.ts index 1f7c6bc9e..20a1b9843 100644 --- a/solutions/typescript/2022/18/src/p2.spec.ts +++ b/solutions/typescript/2022/18/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 18 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(2014); + expect(p2(input)).toEqual(2014); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(58); + expect(p2(input)).toEqual(58); }); }); }); diff --git a/solutions/typescript/2022/19/src/p1.spec.ts b/solutions/typescript/2022/19/src/p1.spec.ts index 34976cc5f..f26a50d9a 100644 --- a/solutions/typescript/2022/19/src/p1.spec.ts +++ b/solutions/typescript/2022/19/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 19 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/19/src/p2.spec.ts b/solutions/typescript/2022/19/src/p2.spec.ts index 69de6ba77..ae1bbfb73 100644 --- a/solutions/typescript/2022/19/src/p2.spec.ts +++ b/solutions/typescript/2022/19/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 19 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/20/src/p1.spec.ts b/solutions/typescript/2022/20/src/p1.spec.ts index 91dc33cc6..908990568 100644 --- a/solutions/typescript/2022/20/src/p1.spec.ts +++ b/solutions/typescript/2022/20/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 20 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(13_289); + expect(p1(input)).toEqual(13_289); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(3); + expect(p1(input)).toEqual(3); }); }); }); diff --git a/solutions/typescript/2022/20/src/p2.spec.ts b/solutions/typescript/2022/20/src/p2.spec.ts index b5c2535c0..8be81f00f 100644 --- a/solutions/typescript/2022/20/src/p2.spec.ts +++ b/solutions/typescript/2022/20/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 20 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(2_865_721_299_243); + expect(p2(input)).toEqual(2_865_721_299_243); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(1_623_178_306); + expect(p2(input)).toEqual(1_623_178_306); }); }); }); diff --git a/solutions/typescript/2022/21/src/p1.spec.ts b/solutions/typescript/2022/21/src/p1.spec.ts index 4b8d7b46b..9e3d7efd2 100644 --- a/solutions/typescript/2022/21/src/p1.spec.ts +++ b/solutions/typescript/2022/21/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 21 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/21/src/p2.spec.ts b/solutions/typescript/2022/21/src/p2.spec.ts index 6c7251ecb..84023a22f 100644 --- a/solutions/typescript/2022/21/src/p2.spec.ts +++ b/solutions/typescript/2022/21/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 21 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/22/src/p1.spec.ts b/solutions/typescript/2022/22/src/p1.spec.ts index 50ffb5163..16c10ad6b 100644 --- a/solutions/typescript/2022/22/src/p1.spec.ts +++ b/solutions/typescript/2022/22/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 22 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(97_356); + expect(p1(input)).toEqual(97_356); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(6032); + expect(p1(input)).toEqual(6032); }); }); }); diff --git a/solutions/typescript/2022/22/src/p2.spec.ts b/solutions/typescript/2022/22/src/p2.spec.ts index 7c10fc5b5..111236473 100644 --- a/solutions/typescript/2022/22/src/p2.spec.ts +++ b/solutions/typescript/2022/22/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 22 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(120_175); + expect(p2(input)).toEqual(120_175); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(5031); + expect(p2(input)).toEqual(5031); }); }); }); diff --git a/solutions/typescript/2022/23/src/p1.spec.ts b/solutions/typescript/2022/23/src/p1.spec.ts index ae49056ed..012902302 100644 --- a/solutions/typescript/2022/23/src/p1.spec.ts +++ b/solutions/typescript/2022/23/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 23 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/23/src/p2.spec.ts b/solutions/typescript/2022/23/src/p2.spec.ts index b1df63ead..d9bb25427 100644 --- a/solutions/typescript/2022/23/src/p2.spec.ts +++ b/solutions/typescript/2022/23/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 23 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/24/src/p1.spec.ts b/solutions/typescript/2022/24/src/p1.spec.ts index dcaf0f953..ea278e53e 100644 --- a/solutions/typescript/2022/24/src/p1.spec.ts +++ b/solutions/typescript/2022/24/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 24 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/24/src/p2.spec.ts b/solutions/typescript/2022/24/src/p2.spec.ts index ae5b0873f..235f553fa 100644 --- a/solutions/typescript/2022/24/src/p2.spec.ts +++ b/solutions/typescript/2022/24/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 24 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/25/src/p1.spec.ts b/solutions/typescript/2022/25/src/p1.spec.ts index b45a74d8d..68ed26302 100644 --- a/solutions/typescript/2022/25/src/p1.spec.ts +++ b/solutions/typescript/2022/25/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2022 25 p1', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(input)).to.equal(0); + expect(p1(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2022/25/src/p2.spec.ts b/solutions/typescript/2022/25/src/p2.spec.ts index 50a076baf..09bf344fd 100644 --- a/solutions/typescript/2022/25/src/p2.spec.ts +++ b/solutions/typescript/2022/25/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2022 25 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(0); + expect(p2(input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2023/01/src/p1.spec.ts b/solutions/typescript/2023/01/src/p1.spec.ts index 35710bf53..adaebe3be 100644 --- a/solutions/typescript/2023/01/src/p1.spec.ts +++ b/solutions/typescript/2023/01/src/p1.spec.ts @@ -7,14 +7,14 @@ describe('2023 01 p1', () => { describe('the input', () => { it('should solve the input', async () => { const resources = await loadTaskResources(packageJson.aoc); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); }); describe('example 1', () => { it('should be solved', async () => { const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p1(resources.input)).to.equal(0); + expect(p1(resources.input)).toEqual(0); }); }); }); diff --git a/solutions/typescript/2023/01/src/p2.spec.ts b/solutions/typescript/2023/01/src/p2.spec.ts index 171e9bbf9..fa6d6f1c1 100644 --- a/solutions/typescript/2023/01/src/p2.spec.ts +++ b/solutions/typescript/2023/01/src/p2.spec.ts @@ -7,14 +7,14 @@ describe('2023 01 p2', () => { describe('the input', () => { it('should solve the input', async () => { const { input } = await loadTaskResources(packageJson.aoc); - expect(p2(input)).to.equal(199_357); + expect(p2(input)).toEqual(199_357); }); }); describe('example 1', () => { it('should be solved', async () => { const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); - expect(p2(input)).to.equal(45_000); + expect(p2(input)).toEqual(45_000); }); }); }); diff --git a/solutions/typescript/libs/lib/src/array/cut-subsegment.function.spec.ts b/solutions/typescript/libs/lib/src/array/cut-subsegment.function.spec.ts index 827430e3e..ffedaeab1 100644 --- a/solutions/typescript/libs/lib/src/array/cut-subsegment.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/cut-subsegment.function.spec.ts @@ -4,13 +4,13 @@ import { cutSubSegment } from './cut-subsegment.function.js'; describe('cutSubSegment', () => { it('should leave behind everything else but the matched part', () => { const arr = [...'(123)']; - expect(cutSubSegment(arr, ['(', ')'], 0)?.join('')).to.equal('123'); - expect(arr.join('')).to.equal(''); + expect(cutSubSegment(arr, ['(', ')'], 0)?.join('')).toEqual('123'); + expect(arr.join('')).toEqual(''); }); it('should find the end of a pair when they are nested', () => { const arr = [...'a(12(t())3)e']; - expect(cutSubSegment(arr, ['(', ')'], 1)?.join('')).to.equal('12(t())3'); - expect(arr.join('')).to.equal('ae'); + expect(cutSubSegment(arr, ['(', ')'], 1)?.join('')).toEqual('12(t())3'); + expect(arr.join('')).toEqual('ae'); }); }); diff --git a/solutions/typescript/libs/lib/src/array/find-end-of-pair.function.spec.ts b/solutions/typescript/libs/lib/src/array/find-end-of-pair.function.spec.ts index 01de9ddfc..4ec5aa5d6 100644 --- a/solutions/typescript/libs/lib/src/array/find-end-of-pair.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/find-end-of-pair.function.spec.ts @@ -5,11 +5,11 @@ describe('findEndOfPair', () => { const a = '(123)'; const b = 'a(12(t())3)e'; it('should find the end of a pair at the end', () => { - expect(findEndOfPair([...a], ['(', ')'], 0)).to.equal(4); + expect(findEndOfPair([...a], ['(', ')'], 0)).toEqual(4); }); it('should find the end of a pair when they are nested', () => { - expect(findEndOfPair([...b], ['(', ')'], 1)).to.equal(10); + expect(findEndOfPair([...b], ['(', ')'], 1)).toEqual(10); }); it('should throw an error if the starting index does not point to the opening pair', () => { @@ -17,6 +17,6 @@ describe('findEndOfPair', () => { }); it('should return undefined if there are no pairs', () => { - expect(findEndOfPair(['('], ['(', ')'], 0)).to.equal(undefined); + expect(findEndOfPair(['('], ['(', ')'], 0)).toEqual(undefined); }); }); diff --git a/solutions/typescript/libs/lib/src/array/flip-matrix.function.spec.ts b/solutions/typescript/libs/lib/src/array/flip-matrix.function.spec.ts index e2a586d64..4cdce3078 100644 --- a/solutions/typescript/libs/lib/src/array/flip-matrix.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/flip-matrix.function.spec.ts @@ -25,13 +25,13 @@ describe('flipMatrix', () => { const joinedYFlippedMatrix = joinMatrix(yFlippedMatrix); it('should be able to flip along the x axis and not mutate the original', () => { - expect(joinMatrix(flipMatrix(matrix, 'x'))).to.equal(joinedXFlippedMatrix); - expect(joinMatrix(matrix)).to.equal(joinedMatrix); + expect(joinMatrix(flipMatrix(matrix, 'x'))).toEqual(joinedXFlippedMatrix); + expect(joinMatrix(matrix)).toEqual(joinedMatrix); }); it('should be able to flip along the y axis and not mutate the original', () => { - expect(joinMatrix(flipMatrix(matrix, 'y'))).to.equal(joinedYFlippedMatrix); - expect(joinMatrix(matrix)).to.equal(joinedMatrix); + expect(joinMatrix(flipMatrix(matrix, 'y'))).toEqual(joinedYFlippedMatrix); + expect(joinMatrix(matrix)).toEqual(joinedMatrix); }); it('should throw an error for one dimensional arrays', () => { @@ -39,6 +39,6 @@ describe('flipMatrix', () => { }); it('should return an empty array for an empty array', () => { - expect(flipMatrix([]).length).to.equal(0); + expect(flipMatrix([]).length).toEqual(0); }); }); diff --git a/solutions/typescript/libs/lib/src/array/groups/slide-window.function.spec.ts b/solutions/typescript/libs/lib/src/array/groups/slide-window.function.spec.ts index 47361d057..72dc3f26f 100644 --- a/solutions/typescript/libs/lib/src/array/groups/slide-window.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/groups/slide-window.function.spec.ts @@ -5,7 +5,7 @@ describe('slideWindow', () => { it('should emit pairs by default', () => { const data = [0, 1, 2, 3, 4, 5, 6]; - expect(slideWindow(data)).to.deep.equal([ + expect(slideWindow(data)).toStrictEqual([ [0, 1], [1, 2], [2, 3], diff --git a/solutions/typescript/libs/lib/src/array/mean.function.spec.ts b/solutions/typescript/libs/lib/src/array/mean.function.spec.ts index 924cefd17..9fde953b2 100644 --- a/solutions/typescript/libs/lib/src/array/mean.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/mean.function.spec.ts @@ -3,14 +3,14 @@ import { mean } from './mean.function.js'; describe('mean', () => { it('should return 1.5 as the average of 0, 1, 2', () => { - expect(mean([0, 1, 2])).to.equal(1); + expect(mean([0, 1, 2])).toEqual(1); }); it('should return 1.5 as the average of 1, 2', () => { - expect(mean([1, 2])).to.equal(1.5); + expect(mean([1, 2])).toEqual(1.5); }); it('should return 0 for an empty array', () => { - expect(mean([])).to.equal(0); + expect(mean([])).toEqual(0); }); }); diff --git a/solutions/typescript/libs/lib/src/array/median.function.spec.ts b/solutions/typescript/libs/lib/src/array/median.function.spec.ts index 820b22fa6..304d508ea 100644 --- a/solutions/typescript/libs/lib/src/array/median.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/median.function.spec.ts @@ -4,11 +4,11 @@ import { median } from './median.function.js'; describe('median', () => { it('should return get the middle one from an odd length array', () => { const array = [0, 1, 2]; - expect(median(array)).to.equal(1); + expect(median(array)).toEqual(1); }); it('should return the average of the middle two elments from even elements', () => { const array = [0, 1, 2, 3]; - expect(median(array)).to.equal(1.5); + expect(median(array)).toEqual(1.5); }); }); diff --git a/solutions/typescript/libs/lib/src/array/peek.function.spec.ts b/solutions/typescript/libs/lib/src/array/peek.function.spec.ts index 1a65a143e..878495ed3 100644 --- a/solutions/typescript/libs/lib/src/array/peek.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/peek.function.spec.ts @@ -5,10 +5,10 @@ describe('peek', () => { it('should return the last value', () => { const array = [0, 1, 2, 3, 4, 5, 6]; - expect(peek(array)).to.equal(6); + expect(peek(array)).toEqual(6); }); it('should return undefined for an empty array', () => { - expect(peek([])).to.equal(undefined); + expect(peek([])).toEqual(undefined); }); }); diff --git a/solutions/typescript/libs/lib/src/array/rotate-matrix.function.spec.ts b/solutions/typescript/libs/lib/src/array/rotate-matrix.function.spec.ts index 606ae9e9b..25431658a 100644 --- a/solutions/typescript/libs/lib/src/array/rotate-matrix.function.spec.ts +++ b/solutions/typescript/libs/lib/src/array/rotate-matrix.function.spec.ts @@ -25,17 +25,17 @@ describe('rotateMatrix', () => { const joinedLeftRotatedMatrix = joinMatrix(leftRotatedMatrix); it('should be able to rotate to the right and not mutate the original', () => { - expect(joinMatrix(rotateMatrix(matrix, 'r'))).to.equal(joinedRightRotatedMatrix); - expect(joinMatrix(matrix)).to.equal(joinedMatrix); + expect(joinMatrix(rotateMatrix(matrix, 'r'))).toEqual(joinedRightRotatedMatrix); + expect(joinMatrix(matrix)).toEqual(joinedMatrix); }); it('should be able to rotate to the left and not mutate the original', () => { - expect(joinMatrix(rotateMatrix(matrix, 'l'))).to.equal(joinedLeftRotatedMatrix); - expect(joinMatrix(matrix)).to.equal(joinedMatrix); + expect(joinMatrix(rotateMatrix(matrix, 'l'))).toEqual(joinedLeftRotatedMatrix); + expect(joinMatrix(matrix)).toEqual(joinedMatrix); }); it('should be able to rotate one dimensional arrays', () => { - expect(joinMatrix(rotateMatrix(['1', '2', '3'] as unknown as string[][], 'l'))).to.equal( + expect(joinMatrix(rotateMatrix(['1', '2', '3'] as unknown as string[][], 'l'))).toEqual( '123', ); }); @@ -43,10 +43,10 @@ describe('rotateMatrix', () => { it('should be able to rotate rectangles', () => { expect( joinMatrix(rotateMatrix([['1'], ['2'], ['3']] as unknown as string[][], 'r')), - ).to.equal('321'); + ).toEqual('321'); }); it('should return an empty array for an empty array', () => { - expect(rotateMatrix([]).length).to.equal(0); + expect(rotateMatrix([]).length).toEqual(0); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/create-tile-matrix-from-map.function.spec.ts b/solutions/typescript/libs/lib/src/functions/create-tile-matrix-from-map.function.spec.ts index b588b618d..d7e241802 100644 --- a/solutions/typescript/libs/lib/src/functions/create-tile-matrix-from-map.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/create-tile-matrix-from-map.function.spec.ts @@ -9,6 +9,6 @@ describe('createTileMatrixFromMap', () => { tileMap.set(new Vec2(0, 0).toString(), '##\n##\n'); it('should be able to generate a tilematrix', () => { const tileMatrix = createTileMatrixFromMap(tileMap); - expect(mergeTileMatrix(tileMatrix)).to.equal('__##\n__##\n##__\n##__\n'); + expect(mergeTileMatrix(tileMatrix)).toEqual('__##\n__##\n##__\n##__\n'); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/find-corners.function.spec.ts b/solutions/typescript/libs/lib/src/functions/find-corners.function.spec.ts index 17bb916eb..1fa8462d4 100644 --- a/solutions/typescript/libs/lib/src/functions/find-corners.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/find-corners.function.spec.ts @@ -6,9 +6,9 @@ describe('findCorners', () => { const vectors = [new Vec2(0, 0), new Vec2(1, 1), new Vec2(1, 2)]; it('should be able to find the corners of the area defined', () => { const { topLeft, topRight, bottomRight, bottomLeft } = findCorners(vectors); - expect(topLeft.toString()).to.equal('0,2'); - expect(topRight.toString()).to.equal('1,2'); - expect(bottomLeft.toString()).to.equal('0,0'); - expect(bottomRight.toString()).to.equal('1,0'); + expect(topLeft.toString()).toEqual('0,2'); + expect(topRight.toString()).toEqual('1,2'); + expect(bottomLeft.toString()).toEqual('0,0'); + expect(bottomRight.toString()).toEqual('1,0'); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/generate-string-tile.function.spec.ts b/solutions/typescript/libs/lib/src/functions/generate-string-tile.function.spec.ts index a051faa6e..13658d6e9 100644 --- a/solutions/typescript/libs/lib/src/functions/generate-string-tile.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/generate-string-tile.function.spec.ts @@ -3,6 +3,6 @@ import { generateStringTile } from './generate-string-tile.function.js'; describe('generateStringTile', () => { it('should be able to generate a tile', () => { - expect(generateStringTile(3, 2, '#')).to.equal('###\n###\n'); + expect(generateStringTile(3, 2, '#')).toEqual('###\n###\n'); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/identity.function.spec.ts b/solutions/typescript/libs/lib/src/functions/identity.function.spec.ts index 629ed4de9..8d6227888 100644 --- a/solutions/typescript/libs/lib/src/functions/identity.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/identity.function.spec.ts @@ -1,21 +1 @@ -import { describe, expect, it } from 'vitest'; -import { identity } from './identity.function.js'; - -describe('identity', () => { - it('should be true for a non-nullish value', () => { - expect(identity(1)).to.be.true; - }); - - it('should be true for a nullish but non-null value', () => { - expect(identity(0)).to.be.true; - }); - - it('should be false for undefined', () => { - expect(identity(undefined)).to.be.false; - }); - - it('should be false for null', () => { - // eslint-disable-next-line unicorn/no-null - expect(identity(null)).to.be.false; - }); -}); +/home/alex/git/@aa/advent-of-code/.prettierrc.js \ No newline at end of file diff --git a/solutions/typescript/libs/lib/src/functions/integer-length.function.spec.ts b/solutions/typescript/libs/lib/src/functions/integer-length.function.spec.ts index 239042901..ca88c1556 100644 --- a/solutions/typescript/libs/lib/src/functions/integer-length.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/integer-length.function.spec.ts @@ -3,40 +3,40 @@ import { integerLength, integerLengthMath } from './integer-length.function.js'; describe('Integer length', () => { it('should work with numbers larger than 1', () => { - expect(integerLength(123)).to.equal(3); - expect(integerLength(7653)).to.equal(4); - expect(integerLength(85_476_847)).to.equal(8); + expect(integerLength(123)).toEqual(3); + expect(integerLength(7653)).toEqual(4); + expect(integerLength(85_476_847)).toEqual(8); }); it('should work with 1', () => { - expect(integerLength(1)).to.equal(1); + expect(integerLength(1)).toEqual(1); }); it('should work with 0', () => { - expect(integerLength(0)).to.equal(1); + expect(integerLength(0)).toEqual(1); }); it('should work with negative numbers', () => { - expect(integerLength(-34_312)).to.equal(5); + expect(integerLength(-34_312)).toEqual(5); }); }); describe('Integer length (Math)', () => { it('should work with numbers larger than 1', () => { - expect(integerLengthMath(123)).to.equal(3); - expect(integerLengthMath(7653)).to.equal(4); - expect(integerLengthMath(85_476_847)).to.equal(8); + expect(integerLengthMath(123)).toEqual(3); + expect(integerLengthMath(7653)).toEqual(4); + expect(integerLengthMath(85_476_847)).toEqual(8); }); it('should work with 1', () => { - expect(integerLengthMath(1)).to.equal(1); + expect(integerLengthMath(1)).toEqual(1); }); it('should work with 0', () => { - expect(integerLengthMath(0)).to.equal(0); + expect(integerLengthMath(0)).toEqual(0); }); it('should work with negative numbers', () => { - expect(integerLengthMath(-34_312)).to.equal(5); + expect(integerLengthMath(-34_312)).toEqual(5); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/memoize.function.spec.ts b/solutions/typescript/libs/lib/src/functions/memoize.function.spec.ts index 6acdb3db3..739b7ecf7 100644 --- a/solutions/typescript/libs/lib/src/functions/memoize.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/memoize.function.spec.ts @@ -9,8 +9,8 @@ describe('Memoize', () => { return a + b; }; const memoizedAdd = memoize(add); - expect(memoizedAdd(1, 2)).to.equal(3); - expect(memoizedAdd(1, 2)).to.equal(3); - expect(callCount).to.equal(1); + expect(memoizedAdd(1, 2)).toEqual(3); + expect(memoizedAdd(1, 2)).toEqual(3); + expect(callCount).toEqual(1); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/merge-tile-matrix.function.spec.ts b/solutions/typescript/libs/lib/src/functions/merge-tile-matrix.function.spec.ts index 7a0949ef9..1919597e4 100644 --- a/solutions/typescript/libs/lib/src/functions/merge-tile-matrix.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/merge-tile-matrix.function.spec.ts @@ -4,6 +4,6 @@ import { mergeTileMatrix } from './merge-tile-matrix.function.js'; describe('mergeTileMatrix', () => { const tiles = [['12\n56\n', '34\n78\n']]; it('should be able to merge the tiles', () => { - expect(mergeTileMatrix(tiles)).to.equal('1234\n5678\n'); + expect(mergeTileMatrix(tiles)).toEqual('1234\n5678\n'); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/non-nullish.function.spec.ts b/solutions/typescript/libs/lib/src/functions/non-nullish.function.spec.ts index c32916834..8d6227888 100644 --- a/solutions/typescript/libs/lib/src/functions/non-nullish.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/non-nullish.function.spec.ts @@ -1,16 +1 @@ -import { describe, expect, it } from 'vitest'; -import { nonNullish } from './non-nullish.function.js'; - -describe('Non Nullish', () => { - it('should return true for non nullish values', () => { - expect(nonNullish(1)).to.be.true; - expect(nonNullish(0)).to.be.true; - expect(nonNullish('')).to.be.true; - }); - - it('should return false for nullish values', () => { - expect(nonNullish(undefined)).to.be.false; - // eslint-disable-next-line unicorn/no-null - expect(nonNullish(null)).to.be.false; - }); -}); +/home/alex/git/@aa/advent-of-code/.prettierrc.js \ No newline at end of file diff --git a/solutions/typescript/libs/lib/src/functions/num-at.function.spec.ts b/solutions/typescript/libs/lib/src/functions/num-at.function.spec.ts index d7f1c6762..8d2a9f89c 100644 --- a/solutions/typescript/libs/lib/src/functions/num-at.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/num-at.function.spec.ts @@ -3,26 +3,26 @@ import { numAt, numAtMath } from './num-at.function.js'; describe('Number at', () => { it('should work with numbers longer than the position', () => { - expect(numAt(123, 1)).to.equal(2); - expect(numAt(7653, 3)).to.equal(3); - expect(numAt(85_476_847, 0)).to.equal(8); + expect(numAt(123, 1)).toEqual(2); + expect(numAt(7653, 3)).toEqual(3); + expect(numAt(85_476_847, 0)).toEqual(8); }); it('should work with the position being negative', () => { - expect(numAt(123, -1)).to.equal(0); - expect(numAt(7653, -2)).to.equal(0); + expect(numAt(123, -1)).toEqual(0); + expect(numAt(7653, -2)).toEqual(0); }); }); describe('Number at (Math)', () => { it('should work with numbers longer than the position', () => { - expect(numAtMath(123, 1)).to.equal(2); - expect(numAtMath(7653, 3)).to.equal(3); - expect(numAtMath(85_476_847, 0)).to.equal(8); + expect(numAtMath(123, 1)).toEqual(2); + expect(numAtMath(7653, 3)).toEqual(3); + expect(numAtMath(85_476_847, 0)).toEqual(8); }); it('should work with the position being negative', () => { - expect(numAtMath(123, -1)).to.equal(0); - expect(numAtMath(7653, -2)).to.equal(0); + expect(numAtMath(123, -1)).toEqual(0); + expect(numAtMath(7653, -2)).toEqual(0); }); }); diff --git a/solutions/typescript/libs/lib/src/functions/num-start.function.spec.ts b/solutions/typescript/libs/lib/src/functions/num-start.function.spec.ts index c1ec08dca..82697fd92 100644 --- a/solutions/typescript/libs/lib/src/functions/num-start.function.spec.ts +++ b/solutions/typescript/libs/lib/src/functions/num-start.function.spec.ts @@ -3,25 +3,25 @@ import { numStart } from './num-start.function.js'; describe('Number start', () => { it('should work with numbers larger than the sliced part', () => { - expect(numStart(12_354_267, 5)).to.equal(12_354); - expect(numStart(7653, 2)).to.equal(76); - expect(numStart(85_476_847, 1)).to.equal(8); - expect(numStart(85_476_847, 0)).to.equal(0); + expect(numStart(12_354_267, 5)).toEqual(12_354); + expect(numStart(7653, 2)).toEqual(76); + expect(numStart(85_476_847, 1)).toEqual(8); + expect(numStart(85_476_847, 0)).toEqual(0); }); it('should work with numbers smaller than the sliced part', () => { - expect(numStart(12_354_267, 8)).to.equal(12_354_267); - expect(numStart(7653, 4)).to.equal(7653); - expect(numStart(85_476_847, 8)).to.equal(85_476_847); + expect(numStart(12_354_267, 8)).toEqual(12_354_267); + expect(numStart(7653, 4)).toEqual(7653); + expect(numStart(85_476_847, 8)).toEqual(85_476_847); }); it('should work with numbers exactly as long as the sliced part', () => { - expect(numStart(12, 5)).to.equal(12_000); - expect(numStart(7653, 5)).to.equal(76_530); - expect(numStart(85, 7)).to.equal(8_500_000); + expect(numStart(12, 5)).toEqual(12_000); + expect(numStart(7653, 5)).toEqual(76_530); + expect(numStart(85, 7)).toEqual(8_500_000); }); it('should work with 0', () => { - expect(numStart(12_354_267, 0)).to.equal(0); + expect(numStart(12_354_267, 0)).toEqual(0); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/add-within-range.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/add-within-range.function.spec.ts index 7e5524a64..7dba6a820 100644 --- a/solutions/typescript/libs/lib/src/math/common/add-within-range.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/add-within-range.function.spec.ts @@ -3,10 +3,10 @@ import { addWithinRange } from './add-within-range.function.js'; describe('Add Withing Range', () => { it('should return 2 when adding 4 to 8 within a range from 1 to 10', () => { - expect(addWithinRange(8, 4, 9)).to.equal(2); + expect(addWithinRange(8, 4, 9)).toEqual(2); }); it('should return 6 when adding 4 to 6 within a range from 4 to 8', () => { - expect(addWithinRange(6, 4, 4, 7)).to.equal(6); + expect(addWithinRange(6, 4, 4, 7)).toEqual(6); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/clamp.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/clamp.function.spec.ts index 2dac5e393..73a2c2332 100644 --- a/solutions/typescript/libs/lib/src/math/common/clamp.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/clamp.function.spec.ts @@ -2,6 +2,6 @@ import { describe, expect, it } from 'vitest'; describe('clamp', () => { it('should work', () => { - expect(1).to.equal(1); + expect(1).toEqual(1); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/divisible.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/divisible.function.spec.ts index a1f53e704..bed49561e 100644 --- a/solutions/typescript/libs/lib/src/math/common/divisible.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/divisible.function.spec.ts @@ -3,10 +3,10 @@ import { divisible } from './divisible.function.js'; describe('divisible', () => { it('should return true if divisible', () => { - expect(divisible(4, 2)).to.be.true; + expect(divisible(4, 2)).toEqual(true); }); it('should return false if not divisible', () => { - expect(divisible(4, 3)).to.be.false; + expect(divisible(4, 3)).toEqual(false); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/egcd.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/egcd.function.spec.ts index 3a23b5943..72446e8db 100644 --- a/solutions/typescript/libs/lib/src/math/common/egcd.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/egcd.function.spec.ts @@ -3,14 +3,14 @@ import { egcd } from './egcd.function.js'; describe('egcd', () => { it('should return 20 with 120 and -20', () => { - expect(egcd(120, -20)[0]).to.equal(20); + expect(egcd(120, -20)[0]).toEqual(20); }); it('should return 3 with 3, 3', () => { - expect(egcd(3, 3)[0]).to.equal(3); + expect(egcd(3, 3)[0]).toEqual(3); }); it('should return 12 with 24, 36', () => { - expect(egcd(24, 36)[0]).to.equal(12); + expect(egcd(24, 36)[0]).toEqual(12); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/gcd.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/gcd.function.spec.ts index 154d4909f..1b225f799 100644 --- a/solutions/typescript/libs/lib/src/math/common/gcd.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/gcd.function.spec.ts @@ -3,14 +3,14 @@ import { gcd } from './gcd.function.js'; describe('gcd', () => { it('should return 20 with 120 and -20', () => { - expect(gcd(120, -20)).to.equal(20); + expect(gcd(120, -20)).toEqual(20); }); it('should return 3 with 3, 3', () => { - expect(gcd(3, 3)).to.equal(3); + expect(gcd(3, 3)).toEqual(3); }); it('should return 12 with 24, 36', () => { - expect(gcd(24, 36)).to.equal(12); + expect(gcd(24, 36)).toEqual(12); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/lcm.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/lcm.function.spec.ts index e85881149..21d65b343 100644 --- a/solutions/typescript/libs/lib/src/math/common/lcm.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/lcm.function.spec.ts @@ -3,10 +3,10 @@ import { lcm } from './lcm.function.js'; describe('Least common multiple', () => { it('should return 120 with 120 and -20', () => { - expect(lcm(120, -20)).to.equal(120); + expect(lcm(120, -20)).toEqual(120); }); it('should return 3 with 3, 3', () => { - expect(lcm(3, 3)).to.equal(3); + expect(lcm(3, 3)).toEqual(3); }); }); diff --git a/solutions/typescript/libs/lib/src/math/common/lerp1d.function.spec.ts b/solutions/typescript/libs/lib/src/math/common/lerp1d.function.spec.ts index b8eba7728..cc49163a5 100644 --- a/solutions/typescript/libs/lib/src/math/common/lerp1d.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/common/lerp1d.function.spec.ts @@ -3,10 +3,10 @@ import { lerp1D } from './lerp1d.function.js'; describe('LERP 1D', () => { it('should return numbers from 2 to 6 when generating a range with boundaries', () => { - expect(lerp1D(2, 6)).to.deep.equal([2, 3, 4, 5, 6]); + expect(lerp1D(2, 6)).toStrictEqual([2, 3, 4, 5, 6]); }); it('should return numbers from 3 to 5 when generating a range without boundaries', () => { - expect(lerp1D(2, 6, { excludeStart: true, excludeEnd: true })).to.deep.equal([3, 4, 5]); + expect(lerp1D(2, 6, { excludeStart: true, excludeEnd: true })).toStrictEqual([3, 4, 5]); }); }); diff --git a/solutions/typescript/libs/lib/src/math/discrete/inverse-modulo.function.spec.ts b/solutions/typescript/libs/lib/src/math/discrete/inverse-modulo.function.spec.ts index 27834c381..891b7b22b 100644 --- a/solutions/typescript/libs/lib/src/math/discrete/inverse-modulo.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/discrete/inverse-modulo.function.spec.ts @@ -3,17 +3,17 @@ import { invModEgdc, invModEgdcBigInt } from './inverse-modulo.function.js'; describe('Inverse Modulo', () => { it('should return 9 with 3 and 26', () => { - expect(invModEgdc(123, 4567)).to.equal(854); - expect(invModEgdcBigInt(123n, 4567n)).to.equal(854n); + expect(invModEgdc(123, 4567)).toEqual(854); + expect(invModEgdcBigInt(123n, 4567n)).toEqual(854n); }); it('should return 854 with 123 and 4567', () => { - expect(invModEgdc(123, 4567)).to.equal(854); - expect(invModEgdcBigInt(123n, 4567n)).to.equal(854n); + expect(invModEgdc(123, 4567)).toEqual(854); + expect(invModEgdcBigInt(123n, 4567n)).toEqual(854n); }); it('should return 347 with 11 636', () => { - expect(invModEgdc(11, 636)).to.equal(347); - expect(invModEgdcBigInt(11n, 636n)).to.equal(347n); + expect(invModEgdc(11, 636)).toEqual(347); + expect(invModEgdcBigInt(11n, 636n)).toEqual(347n); }); }); diff --git a/solutions/typescript/libs/lib/src/math/discrete/modular-exponentiation.function.spec.ts b/solutions/typescript/libs/lib/src/math/discrete/modular-exponentiation.function.spec.ts index 7bfc4d076..5a127cb8c 100644 --- a/solutions/typescript/libs/lib/src/math/discrete/modular-exponentiation.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/discrete/modular-exponentiation.function.spec.ts @@ -3,12 +3,12 @@ import { modExp, modExpBigInt } from './modular-exponentiation.function.js'; describe('Modular Exponentiation', () => { it('should return 11 with 11, 13 and 19', () => { - expect(modExp(11, 636, 17)).to.equal(13); - expect(modExpBigInt(11n, 13n, 19n)).to.equal(11n); + expect(modExp(11, 636, 17)).toEqual(13); + expect(modExpBigInt(11n, 13n, 19n)).toEqual(11n); }); it('should return 13 with 11, 636 and 17', () => { - expect(modExp(11, 13, 19)).to.equal(11); - expect(modExpBigInt(11n, 636n, 17n)).to.equal(13n); + expect(modExp(11, 13, 19)).toEqual(11); + expect(modExpBigInt(11n, 636n, 17n)).toEqual(13n); }); }); diff --git a/solutions/typescript/libs/lib/src/math/discrete/positive-modulo.function.spec.ts b/solutions/typescript/libs/lib/src/math/discrete/positive-modulo.function.spec.ts index f375eb413..26d6ed764 100644 --- a/solutions/typescript/libs/lib/src/math/discrete/positive-modulo.function.spec.ts +++ b/solutions/typescript/libs/lib/src/math/discrete/positive-modulo.function.spec.ts @@ -3,12 +3,12 @@ import { posMod, posModBigInt } from './positive-modulo.function.js'; describe('Positive Modulo', () => { it('should return 2 with 2 and 4', () => { - expect(posMod(2, 4)).to.equal(2); - expect(posModBigInt(2n, 4n)).to.equal(2n); + expect(posMod(2, 4)).toEqual(2); + expect(posModBigInt(2n, 4n)).toEqual(2n); }); it('should return 1 with -3 and 4', () => { - expect(posMod(-3, 4)).to.equal(1); - expect(posModBigInt(-3n, 4n)).to.equal(1n); + expect(posMod(-3, 4)).toEqual(1); + expect(posModBigInt(-3n, 4n)).toEqual(1n); }); }); diff --git a/solutions/typescript/libs/lib/src/math/geometry/manhattan-circle.class.spec.ts b/solutions/typescript/libs/lib/src/math/geometry/manhattan-circle.class.spec.ts index 427d5752d..f41e9165c 100644 --- a/solutions/typescript/libs/lib/src/math/geometry/manhattan-circle.class.spec.ts +++ b/solutions/typescript/libs/lib/src/math/geometry/manhattan-circle.class.spec.ts @@ -52,8 +52,8 @@ describe('ManhattanCircle', () => { const c1c2i = c1.intersect(c2); expect(c1c2i?.length).toBe(2); - expect(c1c2i?.[0].equals(c1c2ia)).to.be.true; - expect(c1c2i?.[1].equals(c1c2ib)).to.be.true; + expect(c1c2i?.[0].equals(c1c2ia)).toEqual(true); + expect(c1c2i?.[1].equals(c1c2ib)).toEqual(true); }); it('should be able to retrieve the intersections in a horizontal arrangement', () => { diff --git a/solutions/typescript/libs/lib/src/model/direction.class.spec.ts b/solutions/typescript/libs/lib/src/model/direction.class.spec.ts index 042fb00b0..d9ea42c5a 100644 --- a/solutions/typescript/libs/lib/src/model/direction.class.spec.ts +++ b/solutions/typescript/libs/lib/src/model/direction.class.spec.ts @@ -3,25 +3,25 @@ import { Direction } from './direction/direction.class.js'; describe('Direction', () => { it('should have correct angular values', () => { - expect(Direction.EAST.angularValue).to.equal(0); - expect(Direction.NORTHEAST.angularValue).to.equal(45); - expect(Direction.NORTH.angularValue).to.equal(90); - expect(Direction.NORTHWEST.angularValue).to.equal(135); - expect(Direction.WEST.angularValue).to.equal(180); - expect(Direction.SOUTHWEST.angularValue).to.equal(225); - expect(Direction.SOUTH.angularValue).to.equal(270); - expect(Direction.SOUTHEAST.angularValue).to.equal(315); + expect(Direction.EAST.angularValue).toEqual(0); + expect(Direction.NORTHEAST.angularValue).toEqual(45); + expect(Direction.NORTH.angularValue).toEqual(90); + expect(Direction.NORTHWEST.angularValue).toEqual(135); + expect(Direction.WEST.angularValue).toEqual(180); + expect(Direction.SOUTHWEST.angularValue).toEqual(225); + expect(Direction.SOUTH.angularValue).toEqual(270); + expect(Direction.SOUTHEAST.angularValue).toEqual(315); }); it('should turn correctly', () => { - expect(Direction.EAST.left()).to.equal(Direction.NORTH); - expect(Direction.NORTH.left()).to.equal(Direction.WEST); - expect(Direction.WEST.left()).to.equal(Direction.SOUTH); - expect(Direction.SOUTH.left()).to.equal(Direction.EAST); + expect(Direction.EAST.left()).toEqual(Direction.NORTH); + expect(Direction.NORTH.left()).toEqual(Direction.WEST); + expect(Direction.WEST.left()).toEqual(Direction.SOUTH); + expect(Direction.SOUTH.left()).toEqual(Direction.EAST); - expect(Direction.EAST.right()).to.equal(Direction.SOUTH); - expect(Direction.NORTH.right()).to.equal(Direction.EAST); - expect(Direction.WEST.right()).to.equal(Direction.NORTH); - expect(Direction.SOUTH.right()).to.equal(Direction.WEST); + expect(Direction.EAST.right()).toEqual(Direction.SOUTH); + expect(Direction.NORTH.right()).toEqual(Direction.EAST); + expect(Direction.WEST.right()).toEqual(Direction.NORTH); + expect(Direction.SOUTH.right()).toEqual(Direction.WEST); }); }); diff --git a/solutions/typescript/libs/lib/src/model/graph/grid-graph.class.spec.ts b/solutions/typescript/libs/lib/src/model/graph/grid-graph.class.spec.ts index 899d7f225..7dc986636 100644 --- a/solutions/typescript/libs/lib/src/model/graph/grid-graph.class.spec.ts +++ b/solutions/typescript/libs/lib/src/model/graph/grid-graph.class.spec.ts @@ -17,14 +17,14 @@ describe('Grid Graph', () => { const finish = new Vec2(5, 4); it('should be able to generate a graph from a matrix', () => { const g = GridGraph.fromMatrix(matrix); - expect([...g.nodes.values()].length).to.equal(matrix.length * (matrix[0]?.length ?? 0)); + expect([...g.nodes.values()].length).toEqual(matrix.length * (matrix[0]?.length ?? 0)); }); describe('Dijkstra', () => { it('should find the shortest path', () => { const g = GridGraph.fromMatrix(matrix); const path = g.dijkstra(g.getNode(start), g.getNode(finish)); - expect(path.length).to.equal(10); + expect(path.length).toEqual(10); }); it('should find the shortest path with diagonal connections', () => { @@ -32,7 +32,7 @@ describe('Grid Graph', () => { connectionDirections: Direction.allDirections, }); const path = g.dijkstra(g.getNode(start), g.getNode(finish)); - expect(path.length).to.equal(6); + expect(path.length).toEqual(6); }); }); @@ -43,7 +43,7 @@ describe('Grid Graph', () => { const path = g.aStar(g.getNode(start), goal, { heuristic: (a) => a.coordinate.manhattan(goal.coordinate), }); - expect(path.length).to.equal(10); + expect(path.length).toEqual(10); }); it('should find the shortest path with diagonal connections', () => { @@ -54,7 +54,7 @@ describe('Grid Graph', () => { const path = g.aStar(g.getNode(start), goal, { heuristic: (a) => a.coordinate.manhattan(goal.coordinate), }); - expect(path.length).to.equal(6); + expect(path.length).toEqual(6); }); }); }); diff --git a/solutions/typescript/libs/lib/src/model/tree/pair-tree.class.spec.ts b/solutions/typescript/libs/lib/src/model/tree/pair-tree.class.spec.ts index b752892c7..e57d0ddfc 100644 --- a/solutions/typescript/libs/lib/src/model/tree/pair-tree.class.spec.ts +++ b/solutions/typescript/libs/lib/src/model/tree/pair-tree.class.spec.ts @@ -15,7 +15,7 @@ describe('pair tree', () => { const leftTree = PairTree.fromNestedPairs([1, 2]); const rightTree = PairTree.fromNestedPairs([3, 4]); const newRoot = leftTree.join(rightTree); - expect(newRoot.toString()).to.equal('[[1,2],[3,4]]'); + expect(newRoot.toString()).toEqual('[[1,2],[3,4]]'); }); it('should be able to join subtrees and not create a new root [1,2] with [2,3] to create a new root', () => { @@ -27,14 +27,14 @@ describe('pair tree', () => { const newNode = subTree.join(rightTree); expect(newNode.parent).to.not.be.undefined; console.log(leftTree.toString()); - expect(leftTree.toString()).to.equal('[1,[[2,3],[4,5]]]'); + expect(leftTree.toString()).toEqual('[1,[[2,3],[4,5]]]'); }); }); describe('findNode', () => { it('should find with side preference', () => { const node = tree.findNode(5, 'right'); - expect(node?.right).to.equal(5); + expect(node?.right).toEqual(5); }); it('should find without side preference', () => { @@ -52,13 +52,13 @@ describe('pair tree', () => { it('should find the next node after the node with 5 in it', () => { const node = tree.findNode(5); const successor = node?.inOrderSuccessor(); - expect(successor?.left).to.equal(6); + expect(successor?.left).toEqual(6); }); it('should find the next node after the node with 7 in it', () => { const node = tree.findNode(7); const successor = node?.inOrderSuccessor(); - expect(successor?.left).to.equal(8); + expect(successor?.left).toEqual(8); }); it('should return undefined if there is no successor', () => { @@ -86,7 +86,7 @@ describe('pair tree', () => { } const inOrderBased = inOrderNumbers.join(','); - expect(generatorBased).to.equal(inOrderBased); + expect(generatorBased).toEqual(inOrderBased); }); }); @@ -94,13 +94,13 @@ describe('pair tree', () => { it('should find the previous node before the node with 6 in it', () => { const node = tree.findNode(6); const predecessor = node?.inOrderPredecessor(); - expect(predecessor?.right).to.equal(5); + expect(predecessor?.right).toEqual(5); }); it('should find the previous node before the node with 2 in it', () => { const node = tree.findNode(3); const predecessor = node?.inOrderPredecessor(); - expect(predecessor?.left).to.equal(2); + expect(predecessor?.left).toEqual(2); }); it('should return undefined if there is no predecessor', () => { @@ -121,7 +121,7 @@ describe('pair tree', () => { values.push(node.rightValue); } } - expect(values).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); + expect(values).toStrictEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); }); }); @@ -136,7 +136,7 @@ describe('pair tree', () => { values.push(node.leftValue); } } - expect(values).to.deep.equal([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]); + expect(values).toStrictEqual([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]); }); }); }); diff --git a/solutions/typescript/libs/lib/src/set/add-all-to-set.function.spec.ts b/solutions/typescript/libs/lib/src/set/add-all-to-set.function.spec.ts index 6dda4162a..427b905d0 100644 --- a/solutions/typescript/libs/lib/src/set/add-all-to-set.function.spec.ts +++ b/solutions/typescript/libs/lib/src/set/add-all-to-set.function.spec.ts @@ -4,6 +4,6 @@ import { addAllToSet } from './add-all-to-set.function.js'; describe('addAllToSet', () => { it('should create a set that has all the elements', () => { const set = addAllToSet([1, 1, 2, 3]); - expect(set.size).to.equal(3); + expect(set.size).toEqual(3); }); }); diff --git a/solutions/typescript/libs/lib/src/string/right-split.function.spec.ts b/solutions/typescript/libs/lib/src/string/right-split.function.spec.ts index 6e64f18df..69af4da58 100644 --- a/solutions/typescript/libs/lib/src/string/right-split.function.spec.ts +++ b/solutions/typescript/libs/lib/src/string/right-split.function.spec.ts @@ -4,19 +4,19 @@ import { rightSplit } from './right-split.function.js'; describe('rightSplit', () => { it('should be able to split a string apart', () => { const [a, b] = rightSplit('a b c'); - expect(a).to.equal('a b'); - expect(b).to.equal('c'); + expect(a).toEqual('a b'); + expect(b).toEqual('c'); }); it('should return the original string if the delimiter does not exist', () => { const [a, b] = rightSplit('a b c', 'x'); - expect(a).to.equal('a b c'); + expect(a).toEqual('a b c'); expect(b).to.be.undefined; }); it('should return the original string if the delimiter is falsy', () => { const [a, b] = rightSplit('a b c', ''); - expect(a).to.equal('a b c'); + expect(a).toEqual('a b c'); expect(b).to.be.undefined; }); }); diff --git a/solutions/typescript/libs/lib/src/string/string-to-matrix.function.spec.ts b/solutions/typescript/libs/lib/src/string/string-to-matrix.function.spec.ts index e40a5b152..cbc2cfc85 100644 --- a/solutions/typescript/libs/lib/src/string/string-to-matrix.function.spec.ts +++ b/solutions/typescript/libs/lib/src/string/string-to-matrix.function.spec.ts @@ -4,6 +4,6 @@ import { stringToMatrix } from './string-to-matrix.function.js'; describe('stringToMatrix', () => { it('should be able to split a string apart', () => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - expect(stringToMatrix('123\n542\n')[1]![1]).to.equal('4'); + expect(stringToMatrix('123\n542\n')[1]![1]).toEqual('4'); }); }); diff --git a/solutions/typescript/libs/lib/src/string/string-to-vectormap.function.spec.ts b/solutions/typescript/libs/lib/src/string/string-to-vectormap.function.spec.ts index afdf3b807..4413c0cbf 100644 --- a/solutions/typescript/libs/lib/src/string/string-to-vectormap.function.spec.ts +++ b/solutions/typescript/libs/lib/src/string/string-to-vectormap.function.spec.ts @@ -7,6 +7,6 @@ describe('stringToVectormap', () => { const vectorMap = stringToVectorMap('123\n542\n', { valueConverter: (s) => Number.parseInt(s, 10), }); - expect(vectorMap.get(new Vec2(1, 1).toString())).to.equal(4); + expect(vectorMap.get(new Vec2(1, 1).toString())).toEqual(4); }); }); diff --git a/solutions/typescript/libs/lib/src/string/vectors-in-string-tile.function.spec.ts b/solutions/typescript/libs/lib/src/string/vectors-in-string-tile.function.spec.ts index 662185812..ac3aeda8c 100644 --- a/solutions/typescript/libs/lib/src/string/vectors-in-string-tile.function.spec.ts +++ b/solutions/typescript/libs/lib/src/string/vectors-in-string-tile.function.spec.ts @@ -5,13 +5,13 @@ describe('vectorsInStringTile', () => { const tile = '.#\n#.'; it('should be able find all the # chatacters positions', () => { const positions = vectorsInStringTile(tile, '#'); - expect(JSON.stringify(positions)).to.equal('[{"x":1,"y":0},{"x":0,"y":1}]'); - expect(positions.length).to.equal(2); + expect(JSON.stringify(positions)).toEqual('[{"x":1,"y":0},{"x":0,"y":1}]'); + expect(positions.length).toEqual(2); }); it('should be able find all the # chatacters positions indexed from the bottom', () => { const positions = vectorsInStringTile(tile, '#', true); - expect(JSON.stringify(positions)).to.equal('[{"x":1,"y":1},{"x":0,"y":0}]'); - expect(positions.length).to.equal(2); + expect(JSON.stringify(positions)).toEqual('[{"x":1,"y":1},{"x":0,"y":0}]'); + expect(positions.length).toEqual(2); }); });