C-Jansek / advent-of-code

0 stars 0 forks source link

Add ts-jest testing config and adapt template #4

Open C-Jansek opened 8 months ago

C-Jansek commented 8 months ago

It should be easily possible to add tests to the individual days.

This would help in writing better code faster. It would help to gain an overview of more complex days since you could test individual classes/methods.

This should also make it easier to de refactoring when the day is finished.

Installation ts-jest

How to install ts-jest is explained here: https://kulshekhar.github.io/ts-jest/docs/getting-started/installation/#jest-config-file

Adapting template

The default template should be adapted. This would mean:

In addition to the default template, we should also generate a default test file from a template.

C-Jansek commented 8 months ago

This has already been done in one of the projects that uses this template, see https://github.com/C-Jansek/aoc-2023/pull/2