-
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
chore: Add jest unit testing #67
Merged
Merged
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
9a54d5f
Fix .meshrc type errors
jfoo1984 b75a9e4
Change mesh schema script permissions
jfoo1984 9baaa28
Add jest
jfoo1984 000743b
Add test to check for valid schema
jfoo1984 d1411ec
Configure jest tests to run on every push
jfoo1984 c5ff7fe
Trigger tests
jfoo1984 ddf7f95
Add node setup for tests
jfoo1984 4eff0e6
Rename workflow and job
jfoo1984 29271ce
install lib curl to fix dependency installation issue
jfoo1984 eefce76
Rename github action file
jfoo1984 91ae46e
Change libcurl package name
jfoo1984 a7d8b1c
Need libcurl dev package
jfoo1984 27ea02f
search for right libcurl package
jfoo1984 2f3fdbe
Print linux version
jfoo1984 004afcf
Print linux distribution version
jfoo1984 409a841
run apt-get update
jfoo1984 45fb166
Remove libcurl search
jfoo1984 b75845f
Update test snapshot
jfoo1984 7274414
Build mesh before running tests
jfoo1984 2ec79e6
Add schema snapshot test and zip link query test
jfoo1984 d89bc0a
deps: update dependencies to latest
jfoo1984 3b81807
Merge branch 'main' into CZID-9015-add-snapshot-tests
jfoo1984 9c4579b
Use main branch of conventional commits
jfoo1984 cc00f12
Rename schema test
jfoo1984 f1cadf1
Rename schema test snapshot
jfoo1984 6aeff3c
Clean up whitespace in mock store
jfoo1984 0d22c3c
Stop pushing PR merges to staging automatically
jfoo1984 9374cc2
Modularize mocks in meshrc.yml
jfoo1984 7893dd0
Update tests to run in docker container
jfoo1984 8244aaa
Extract common code in tests
jfoo1984 f684433
Create docker network to allow tests to run in CI
jfoo1984 8dbb400
Add docker command to allow network to be created
jfoo1984 4fa7b05
Add verbose to jest for debugging
jfoo1984 1c10573
Switch back to run tests without docker
jfoo1984 694101c
Build mesh artifacts before running tests
jfoo1984 1764998
Run build in test command
jfoo1984 1963564
Build docker image for CI tests
jfoo1984 9c2dd99
Updates to fix tests
jfoo1984 63a1b5a
Change to stubbing responses to test resolvers
jfoo1984 250f37f
Remove mock plugin and references
jfoo1984 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Jest unit tests | ||
on: push | ||
|
||
jobs: | ||
jest-unit-tests: | ||
runs-on: [ARM64, self-hosted, Linux] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.node-version' | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libcurl4-openssl-dev | ||
- name: Install package dependencies | ||
run: | | ||
npm ci --verbose --no-optional | ||
- name: Build Mesh | ||
run: | | ||
npm run build | ||
- name: Run tests | ||
run: | | ||
npm test |
This file was deleted.
Oops, something went wrong.
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
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ | |
"type": "object", | ||
"properties": { | ||
"tax_id": { | ||
"type": "integer" | ||
"type": "string" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align to schema returned by resolver. This was preventing the tests from running, because the schema could not be generated |
||
}, | ||
"name": { | ||
"type": "string" | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align to schema returned by resolver. This was preventing the tests from running, because the schema could not be generated