Skip to content
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: Replace jest with vitest for Hasura introspection tests #3981

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hasura.planx.uk/tests/analytics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe("analytics and analytics_logs", () => {
});

describe("api", () => {
let i;
beforeAll(async () => {
i = await introspectAs("api");
});
Expand Down
1 change: 1 addition & 0 deletions hasura.planx.uk/tests/flow_document_templates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ describe("flow_document_templates", () => {
});

describe("api", () => {
let i;
beforeAll(async () => {
i = await introspectAs("api");
});
Expand Down
13 changes: 4 additions & 9 deletions hasura.planx.uk/tests/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
{
"scripts": {
"test": "echo 'Running hasura tests…' && jest && echo 'Hasura tests passed.'",
"test:watch": "jest --watch",
"test": "echo 'Running hasura tests…' && vitest run && echo 'Hasura tests passed.'",
"test:watch": "vitest watch",
"build-jwt": "DOTENV_CONFIG_PATH=../.env.test node -r dotenv/config scripts/buildJWT.js"
},
"dependencies": {
"dotenv": "^16.4.1",
"isomorphic-fetch": "^3.0.0",
"jest": "^29.7.0",
"jsonwebtoken": "^9.0.1",
"uuid": "^11.0.2"
},
"jest": {
"setupFilesAfterEnv": [
"./jest.setup.js"
]
"uuid": "^11.0.2",
"vitest": "^2.1.5"
},
"pnpm": {
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions hasura.planx.uk/tests/payment_requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const insertSessions = async (sessionIds) => {
}
`;
const res = await gqlAdmin(query);
ids = res.data.insert_lowcal_sessions.returning.map((row) => row.id);
const ids = res.data.insert_lowcal_sessions.returning.map((row) => row.id);
assert.strictEqual(ids.length, 2);
};

Expand Down Expand Up @@ -224,7 +224,7 @@ const insertPaymentRequests = async (sessionIds, paymentRequestIds) => {
}
`;
const res = await gqlAdmin(query);
ids = res.data.insert_payment_requests.returning.map((row) => row.id);
const ids = res.data.insert_payment_requests.returning.map((row) => row.id);
assert.strictEqual(ids.length, 2);
};

Expand Down
Loading
Loading