Skip to content

Commit 41e28b7

Browse files
committed
removed expect-expect rule and adapted tests
1 parent bc97969 commit 41e28b7

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ module.exports = [
6666
rules: {
6767
...vitest.configs.recommended.rules,
6868
// @TODO: Remove all of these rules and adapt code!
69-
"vitest/expect-expect": "off",
7069
"vitest/valid-title": "off",
7170
"vitest/valid-expect": "off",
7271
},

tests/dump.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test, describe, beforeEach } from "vitest";
2-
import { ErrorStatusCode } from "../src/types";
2+
import { ErrorStatusCode, TaskStatus } from "../src/types";
33
import {
44
clearAllIndexes,
55
config,
@@ -13,13 +13,15 @@ beforeEach(async () => {
1313
});
1414

1515
describe.each([{ permission: "Master" }, { permission: "Admin" }])(
16-
"Test on dump",
16+
"Test on dump should succeed with right permission",
1717
({ permission }) => {
1818
test(`${permission} key: create a new dump`, async () => {
1919
const client = await getClient(permission);
2020
const { taskUid } = await client.createDump();
2121

22-
await client.waitForTask(taskUid);
22+
const taskResult = await client.waitForTask(taskUid);
23+
24+
expect(taskResult).toHaveProperty("status", TaskStatus.TASK_SUCCEEDED);
2325
});
2426
},
2527
);

tests/snapshots.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { beforeEach, describe, expect, test } from "vitest";
2-
import { ErrorStatusCode } from "../src/types";
2+
import { ErrorStatusCode, TaskStatus } from "../src/types";
33
import {
44
clearAllIndexes,
55
config,
@@ -13,13 +13,15 @@ beforeEach(async () => {
1313
});
1414

1515
describe.each([{ permission: "Master" }, { permission: "Admin" }])(
16-
"Test on snapshot",
16+
"Test on snapshot should succeed with right permission",
1717
({ permission }) => {
1818
test(`${permission} key: create a new snapshot`, async () => {
1919
const client = await getClient(permission);
2020
const { taskUid } = await client.createSnapshot();
2121

22-
await client.waitForTask(taskUid);
22+
const taskResult = await client.waitForTask(taskUid);
23+
24+
expect(taskResult).toHaveProperty("status", TaskStatus.TASK_SUCCEEDED);
2325
});
2426
},
2527
);

0 commit comments

Comments
 (0)