teach tests about the new way we fail websockets
This commit is contained in:
parent
e111d8aa55
commit
77852b8cce
3 changed files with 11 additions and 2 deletions
|
|
@ -237,8 +237,8 @@ describe('API', () => {
|
|||
'homeTimeline',
|
||||
() => { },
|
||||
), (err: IncomingMessage) => {
|
||||
assert.strictEqual(err.statusCode, 401);
|
||||
assert.ok(err.headers['www-authenticate']?.startsWith('Bearer realm="Misskey", error="invalid_token", error_description'));
|
||||
assert.strictEqual(err.statusCode, 4000);
|
||||
assert.ok(err.reason?.startsWith('Failed to authenticate'));
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue