mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-04-28 09:36:56 +00:00
fix time zone for CustomEmojiService test
otherwise, the timestamps that the test uses for queries are interpreted as UTC (because they have a TZ in the string), but the truncated date is interpreted in the session timezone, which defaults to the server timezone, which can be anything thanks to @fEmber for noticing
This commit is contained in:
parent
c28b27b57f
commit
029f67b7e5
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,7 @@ import { EmojisRepository } from '@/models/_.js';
|
|||
import { MiEmoji } from '@/models/Emoji.js';
|
||||
import { CoreModule } from '@/core/CoreModule.js';
|
||||
import { DriveService } from '@/core//DriveService.js';
|
||||
import { DataSource } from 'typeorm';
|
||||
|
||||
describe('CustomEmojiService', () => {
|
||||
let app: TestingModule;
|
||||
|
@ -48,6 +49,7 @@ describe('CustomEmojiService', () => {
|
|||
service = app.get<CustomEmojiService>(CustomEmojiService);
|
||||
emojisRepository = app.get<EmojisRepository>(DI.emojisRepository);
|
||||
idService = app.get<IdService>(IdService);
|
||||
await app.get<DataSource>(DI.db).query("set session time zone 'UTC'");
|
||||
});
|
||||
|
||||
describe('fetchEmojis', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue