Skip to content

test: clean up remaining core function tests, introduce testing utilities and an ISO helper - #351

Merged
Tlacenka merged 7 commits into
mainfrom
core-test-refactor-2
Dec 12, 2023
Merged

test: clean up remaining core function tests, introduce testing utilities and an ISO helper#351
Tlacenka merged 7 commits into
mainfrom
core-test-refactor-2

Conversation

@Tlacenka

@TlacenkaTlacenka commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator

Closes#215#264

This PR is the last one for the core package test refactor. In it, I do the following:

  • Minimise test scope (this means mocking unrelated logic, moving tests to minimal entity).
  • Improve test descriptions and test flow.
  • Introduce ISO Regexp to help with checking date values.
  • Introduce minimal mocks to be reused when a config is required.
  • I fix the coverage CI (previously, core tests were failing) by adding integration-test target to testing-utils and minimising fs dependence of core tests. Run here. 🚥 🟢
  • testing-utils are now buildable due to nx buildable rule.

@TlacenkaTlacenka self-assigned this Dec 6, 2023
@TlacenkaTlacenka linked an issue Dec 12, 2023 that may be closed by this pull request
@TlacenkaTlacenka changed the title test(core): clean up remaining core function tests, introduce testing utilities and an ISO helpertest: clean up remaining core function tests, introduce testing utilities and an ISO helperDec 12, 2023

@MishaSeredenkoPushBasedMishaSeredenkoPushBased left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@matejchalkmatejchalk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great now all our tests finally pass when run at once 🎉 Big step forward for stability 👏

Comment threadpackages/core/src/lib/collect-and-persist.unit.test.ts Outdated
Comment threadpackages/core/src/lib/collect-and-persist.unit.test.ts Outdated
Comment threadpackages/core/src/lib/collect-and-persist.unit.test.ts Outdated
Comment threadpackages/core/src/lib/implementation/collect.integration.test.ts Outdated
Comment threadpackages/core/src/lib/upload.unit.test.ts Outdated
Comment threadtesting-utils/package.json
Comment threadtesting-utils/project.json Outdated
Comment threadtesting-utils/src/lib/fixtures/configs/minimal-config.mock.ts Outdated
@github-actionsgithub-actionsBot added the 🦾 CI/CD Continuous integration and deployment label Dec 12, 2023
matejchalk
matejchalk previously approved these changes Dec 12, 2023
Comment threadpackages/core/src/lib/collect-and-persist.unit.test.ts Outdated
@Tlacenka
Tlacenka merged commit b1f13c3 into mainDec 12, 2023
@Tlacenka
Tlacenka deleted the core-test-refactor-2 branch December 12, 2023 12:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🦾 CI/CDContinuous integration and deployment🧩 cli🧩 core🔬 testingwriting tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling files in tests core package test refactor

3 participants

@Tlacenka@matejchalk@MishaSeredenkoPushBased