mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
fix type errors in e2e tests
This commit is contained in:
@@ -16,7 +16,7 @@ describe('export-clips', () => {
|
|||||||
let bob: misskey.entities.SignupResponse;
|
let bob: misskey.entities.SignupResponse;
|
||||||
|
|
||||||
// XXX: Any better way to get the result?
|
// XXX: Any better way to get the result?
|
||||||
async function pollFirstDriveFile() {
|
async function pollFirstDriveFile(): Promise<any> {
|
||||||
while (true) {
|
while (true) {
|
||||||
const files = (await api('drive/files', {}, alice)).body;
|
const files = (await api('drive/files', {}, alice)).body;
|
||||||
if (!files.length) {
|
if (!files.length) {
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ function assertIndirectError(response: Response, error: string): void {
|
|||||||
async function assertDirectError(response: Response, status: number, error: string): Promise<void> {
|
async function assertDirectError(response: Response, status: number, error: string): Promise<void> {
|
||||||
assert.strictEqual(response.status, status);
|
assert.strictEqual(response.status, status);
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json() as any;
|
||||||
assert.strictEqual(data.error, error);
|
assert.strictEqual(data.error, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -704,7 +704,7 @@ describe('OAuth', () => {
|
|||||||
const response = await fetch(new URL('.well-known/oauth-authorization-server', host));
|
const response = await fetch(new URL('.well-known/oauth-authorization-server', host));
|
||||||
assert.strictEqual(response.status, 200);
|
assert.strictEqual(response.status, 200);
|
||||||
|
|
||||||
const body = await response.json();
|
const body = await response.json() as any;
|
||||||
assert.strictEqual(body.issuer, 'http://misskey.local');
|
assert.strictEqual(body.issuer, 'http://misskey.local');
|
||||||
assert.ok(body.scopes_supported.includes('write:notes'));
|
assert.ok(body.scopes_supported.includes('write:notes'));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user