fix permissions and teacher attendance workflows

This commit is contained in:
2026-07-10 20:40:52 +08:00
parent 247879f276
commit 8ed1682b90
95 changed files with 4745 additions and 1237 deletions

View File

@@ -0,0 +1,15 @@
import { normalizeDateOnly } from './date-normalization';
describe('normalizeDateOnly', () => {
it('keeps date-only values unchanged', () => {
expect(normalizeDateOnly('2026-07-02')).toBe('2026-07-02');
});
it('converts legacy ISO timestamps to their UTC calendar date', () => {
expect(normalizeDateOnly('2026-07-01T16:00:00.000Z')).toBe('2026-07-01');
});
it('rejects unsupported date formats', () => {
expect(() => normalizeDateOnly('07/01/2026')).toThrow('无效日期格式');
});
});