Fix flaking tests

This commit is contained in:
Cooldude2606 committed 2025-05-21 17:13:43 +01:00
1 parent 63e30dd0ee
commit 3ff80119e6
2 files changed
+6 -4

No files matched your search

+4 -1
View File
@@ -286,11 +286,14 @@ describe("player_auth", function() {
new SetVerifyCodeRequest("test", verify_code) new SetVerifyCodeRequest("test", verify_code)
); );
const user = controllerPlugin.controller.userManager.getByName("test");
const token = controllerPlugin.controller.userManager.signUserToken(user);
const verifyResult = await postJSON( const verifyResult = await postJSON(
`${controllerUrl}/api/player_auth/verify`, `${controllerUrl}/api/player_auth/verify`,
{ player_code: playerCode, verify_code, verify_token } { player_code: playerCode, verify_code, verify_token }
); );
assert.equal((await verifyResult.json()).verified, true); assert.equal(verifyResult.status, 200);
assert.deepEqual(await verifyResult.json(), { verified: true, token: token });
}); });
}); });
}); });
+2 -3
View File
@@ -707,9 +707,8 @@ describe("Integration of Clusterio", function() {
for (let [, , configName, expectedResult] of testConfigs) { for (let [, , configName, expectedResult] of testConfigs) {
assert.equal(await sendRcon(44, `/config get ${configName}`), `${expectedResult}\n`); assert.equal(await sendRcon(44, `/config get ${configName}`), `${expectedResult}\n`);
} }
});
it("should not change the instance status", async function() { // should not change instance status
slowTest(this);
await checkInstanceStatus(44, "running"); await checkInstanceStatus(44, "running");
}); });
it("should allow creating and removing props", async function() { it("should allow creating and removing props", async function() {