Files
openmaic/OpenMAIC/tests/pbl/v2/assets.test.ts
2026-08-16 14:58:47 +08:00

20 lines
598 B
TypeScript

import { readFileSync } from 'node:fs';
import { describe, expect, test } from 'vitest';
function expectPng(path: string) {
const bytes = readFileSync(path);
expect(bytes.length).toBeGreaterThan(0);
expect([...bytes.subarray(0, 8)]).toEqual([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
}
describe('PBL v2 static assets', () => {
test('ships the instructor avatar referenced by the runtime UI', () => {
expectPng('public/avatars/instructor.png');
});
test('ships the OpenMAIC mark used in the workspace header', () => {
expectPng('public/openmaic-mark.png');
});
});