Merge branch 'main' into fix/private-realtime-events-20260812
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { formatSeoulDateTime, formatSeoulHourMinute } from '../src/utils/legacyDateTime.ts';
|
||||
|
||||
void test('formats API UTC timestamps in the server Seoul timezone', () => {
|
||||
assert.equal(formatSeoulDateTime('2026-08-13T00:07:06.713Z'), '2026-08-13 09:07:06');
|
||||
assert.equal(formatSeoulHourMinute('2026-08-13T00:07:06.713Z'), '09:07');
|
||||
});
|
||||
|
||||
void test('keeps legacy timezone-less server timestamps unchanged', () => {
|
||||
assert.equal(formatSeoulDateTime('2026-08-13 09:07:06'), '2026-08-13 09:07:06');
|
||||
assert.equal(formatSeoulHourMinute('2026-08-13 09:07:06'), '09:07');
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
import { formatNationLevelText, formatOfficerLevelText } from '../src/utils/nationFormat.ts';
|
||||
|
||||
void describe('nationFormat Ref labels', () => {
|
||||
void it('uses the Ref nation-level and nation-dependent office names', () => {
|
||||
assert.equal(formatNationLevelText(0), '방랑군');
|
||||
assert.equal(formatNationLevelText(3), '주자사');
|
||||
assert.equal(formatNationLevelText(7), '황제');
|
||||
assert.equal(formatOfficerLevelText(9, 3), '간의대부');
|
||||
assert.equal(formatOfficerLevelText(5, 3), '-');
|
||||
assert.equal(formatOfficerLevelText(5), '제3모사');
|
||||
});
|
||||
|
||||
void it('does not expose unknown numeric levels', () => {
|
||||
assert.equal(formatNationLevelText(99), '-');
|
||||
assert.equal(formatOfficerLevelText(99), '-');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user