mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-29 07:49:53 +01:00
fix test
This commit is contained in:
parent
28fdf1b9a6
commit
a685336a8b
3 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,6 @@ import type { MiUser } from '@/models/User.js';
|
|||
import type { MiChannel } from '@/models/Channel.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { isNotNull } from '@/misc/is-not-null.js';
|
||||
import { DriveFileEntityService } from './DriveFileEntityService.js';
|
||||
import { NoteEntityService } from './NoteEntityService.js';
|
||||
|
||||
|
@ -98,7 +97,7 @@ export class ChannelEntityService {
|
|||
...(
|
||||
opts?.pinnedNotes
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
? channel.pinnedNoteIds.map(it => opts.pinnedNotes!.get(it)).filter(isNotNull)
|
||||
? channel.pinnedNoteIds.map(it => opts.pinnedNotes!.get(it)).filter(it => it != null)
|
||||
: await this.notesRepository.findBy({ id: In(channel.pinnedNoteIds) })
|
||||
),
|
||||
);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
// How to run:
|
||||
|
@ -12,8 +11,8 @@
|
|||
import * as assert from 'assert';
|
||||
import { entities } from 'misskey-js';
|
||||
import { Redis } from 'ioredis';
|
||||
import { loadConfig } from '@/config.js';
|
||||
import { afterEach, beforeAll } from '@jest/globals';
|
||||
import { loadConfig } from '@/config.js';
|
||||
import {
|
||||
api,
|
||||
initTestDb,
|
||||
|
@ -91,6 +90,7 @@ describe('Timelines', () => {
|
|||
|
||||
beforeAll(async () => {
|
||||
redisForTimelines = new Redis(loadConfig().redisForTimelines);
|
||||
root = await signup({ username: 'root' });
|
||||
|
||||
// FTT無効の状態で見たいときはコメントアウトを外す
|
||||
await api('admin/update-meta', { enableFanoutTimeline: false }, root);
|
||||
|
|
|
@ -6,4 +6,5 @@
|
|||
module.exports = async () => {
|
||||
// DBはUTC(っぽい)ので、テスト側も合わせておく
|
||||
process.env.TZ = 'UTC';
|
||||
process.env.NODE_ENV = 'test';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue