Skip to content

Commit

Permalink
chore: Fix syntax errors in test files caught by vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 19, 2024
1 parent 7807645 commit 1f925ce
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
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 && 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
1 change: 1 addition & 0 deletions hasura.planx.uk/tests/reconciliation_requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe("reconciliation_requests", () => {
});

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

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

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

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

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

describe("teamEditor", () => {
let i;
beforeAll(async () => {
i = await introspectAs("teamEditor");
});
Expand Down

0 comments on commit 1f925ce

Please sign in to comment.