mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-28 08:53:02 +00:00
fix lint errors in backend unit tests
This commit is contained in:
parent
7431866d86
commit
b5a1c54d65
6 changed files with 11 additions and 11 deletions
|
@ -237,7 +237,7 @@ describe('アンテナ', () => {
|
||||||
status: 400,
|
status: 400,
|
||||||
code: 'EMPTY_KEYWORD',
|
code: 'EMPTY_KEYWORD',
|
||||||
id: '53ee222e-1ddd-4f9a-92e5-9fb82ddb463a'
|
id: '53ee222e-1ddd-4f9a-92e5-9fb82ddb463a'
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
//#region 更新(antennas/update)
|
//#region 更新(antennas/update)
|
||||||
|
@ -276,7 +276,7 @@ describe('アンテナ', () => {
|
||||||
status: 400,
|
status: 400,
|
||||||
code: 'EMPTY_KEYWORD',
|
code: 'EMPTY_KEYWORD',
|
||||||
id: '721aaff6-4e1b-4d88-8de6-877fae9f68c4'
|
id: '721aaff6-4e1b-4d88-8de6-877fae9f68c4'
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
@ -156,7 +156,7 @@ describe('Webリソース', () => {
|
||||||
|
|
||||||
describe(' has entry such ', () => {
|
describe(' has entry such ', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
post(alice, { text: "**a**" })
|
post(alice, { text: "**a**" });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('MFMを含まない。', async () => {
|
test('MFMを含まない。', async () => {
|
||||||
|
@ -169,7 +169,7 @@ describe('Webリソース', () => {
|
||||||
throw new Error("MFM shouldn't be included");
|
throw new Error("MFM shouldn't be included");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.each([{ path: '/api/foo' }])('$path', ({ path }) => {
|
describe.each([{ path: '/api/foo' }])('$path', ({ path }) => {
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe('FileInfoService', () => {
|
||||||
delete fi.porn;
|
delete fi.porn;
|
||||||
|
|
||||||
return fi;
|
return fi;
|
||||||
}
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
app = await Test.createTestingModule({
|
app = await Test.createTestingModule({
|
||||||
|
|
|
@ -89,8 +89,8 @@ describe('SigninWithPasskeyApiService', () => {
|
||||||
app = await Test.createTestingModule({
|
app = await Test.createTestingModule({
|
||||||
imports: [GlobalModule, CoreModule],
|
imports: [GlobalModule, CoreModule],
|
||||||
providers: [
|
providers: [
|
||||||
SigninWithPasskeyApiService,
|
SigninWithPasskeyApiService,
|
||||||
{ provide: RateLimiterService, useClass: FakeLimiter },
|
{ provide: RateLimiterService, useClass: FakeLimiter },
|
||||||
{ provide: SigninService, useClass: FakeSigninService },
|
{ provide: SigninService, useClass: FakeSigninService },
|
||||||
],
|
],
|
||||||
}).useMocker((token) => {
|
}).useMocker((token) => {
|
||||||
|
@ -116,7 +116,7 @@ describe('SigninWithPasskeyApiService', () => {
|
||||||
|
|
||||||
const dummyUser = {
|
const dummyUser = {
|
||||||
id: uid, username: uid, usernameLower: uid.toLocaleLowerCase(), uri: null, host: null,
|
id: uid, username: uid, usernameLower: uid.toLocaleLowerCase(), uri: null, host: null,
|
||||||
};
|
};
|
||||||
const dummyProfile = {
|
const dummyProfile = {
|
||||||
userId: uid,
|
userId: uid,
|
||||||
password: 'qwerty',
|
password: 'qwerty',
|
||||||
|
|
|
@ -314,7 +314,7 @@ describe('ActivityPub', () => {
|
||||||
// actor2Note is from a different server and needs to be fetched again
|
// actor2Note is from a different server and needs to be fetched again
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
resolver.remoteGetTrials(),
|
resolver.remoteGetTrials(),
|
||||||
[actor1.id, `${actor1.id}/outbox`, actor1.featured, actor2Note.id, actor2.id, `${actor2.id}/outbox` ],
|
[actor1.id, `${actor1.id}/outbox`, actor1.featured, actor2Note.id, actor2.id, `${actor2.id}/outbox`],
|
||||||
);
|
);
|
||||||
|
|
||||||
const note = await noteService.fetchNote(actor2Note.id);
|
const note = await noteService.fetchNote(actor2Note.id);
|
||||||
|
@ -440,7 +440,7 @@ describe('ActivityPub', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('JSON-LD', () =>{
|
describe('JSON-LD', () => {
|
||||||
test('Compaction', async () => {
|
test('Compaction', async () => {
|
||||||
const jsonLd = jsonLdService.use();
|
const jsonLd = jsonLdService.use();
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ describe(SkLatestNote, () => {
|
||||||
|
|
||||||
it('should return true when keys match with different file counts', () => {
|
it('should return true when keys match with different file counts', () => {
|
||||||
const first = new MiNote({ id: '1', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1'] });
|
const first = new MiNote({ id: '1', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1'] });
|
||||||
const second = new MiNote({ id: '2', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1','2'] });
|
const second = new MiNote({ id: '2', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1', '2'] });
|
||||||
|
|
||||||
const result = SkLatestNote.areEquivalent(first, second);
|
const result = SkLatestNote.areEquivalent(first, second);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue