Skip to content

Commit

Permalink
chore: adjust comment
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Dec 19, 2024
1 parent 0552fd4 commit 1e876b8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/backend/server/tests/version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,22 @@ test('should be able to prevent requests if version outdated', async t => {
await t.throwsAsync(
fetchWithVersion(app.getHttpServer(), '0.0.0', HttpStatus.FORBIDDEN),
{ message: 'Unsupported client version. Please upgrade to 0.0.1.' },
'should check version if valid minVersion provided'
'should reject version if valid minVersion provided'
);

await runtime.set('version/minVersion', '0.0.5 || >=0.0.7');
await t.notThrowsAsync(
fetchWithVersion(app.getHttpServer(), '0.0.5', HttpStatus.OK),
'should pass version if version satisfies minVersion'
);
await t.throwsAsync(
fetchWithVersion(app.getHttpServer(), '0.0.6', HttpStatus.FORBIDDEN),
{ message: 'Unsupported client version. Please upgrade to 0.0.7.' },
'should check version if valid minVersion provided'
'should reject version if valid minVersion provided'
);
await t.notThrowsAsync(
fetchWithVersion(app.getHttpServer(), '0.1.0', HttpStatus.OK),
'should pass version if version satisfies minVersion'
);
}
});

0 comments on commit 1e876b8

Please sign in to comment.