-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Hapi Lab with node-test for test runner #1589
Draft
Cruikshanks
wants to merge
17
commits into
main
Choose a base branch
from
switch-to-node-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cruikshanks
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Dec 30, 2024
DEFRA/water-abstraction-team#130 We as a team would love to move the [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system) project to use [ECMAScript Modules (ESM)](https://nodejs.org/api/esm.html). The one thing that has held us back is our test framework [Hapi Lab](https://hapi.dev/module/lab/). We've worked hard over the last year restructuring how we build our tests and [moving away from our dependence on the database](DEFRA/water-abstraction-team#124). This means we are now ready to make the switch to a test framework that natively supports ESM. We've opted for [node-test](https://nodejs.org/api/test.html#test-runner). In this change we - remove the **Hapi Lab** dependency - update all tests to require **node-test** - update our scripts to use **node-test**
This removed the dependence in some of the model tests on verifying a model was 'right' by checking the length of a returned query and asserting that the expected result was always at position `[0]` in the array.
Cruikshanks
force-pushed
the
switch-to-node-test
branch
from
December 30, 2024 18:01
d9d0466
to
14beca0
Compare
Looks like we were piggy backing on a dependency Hapi lab or something it was using was brining in!
Cruikshanks
force-pushed
the
switch-to-node-test
branch
from
December 31, 2024 09:17
e2cfd2b
to
fec0d3f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DEFRA/water-abstraction-team#130
We as a team would love to move the water-abstraction-system project to use ECMAScript Modules (ESM). The one thing that has held us back is our test framework Hapi Lab.
We've worked hard over the last year restructuring how we build our tests and moving away from our dependence on the database.
This means we are now ready to make the switch to a test framework that natively supports ESM. We've opted for node-test.
In this change, we