import test from 'node:test' import assert from 'node:assert/strict' import { createHash } from 'node:crypto' import { readFile } from 'node:fs/promises' const iconNames = [ '20x20.png', '29x29.png', '40x40.png', '58x58.png', '60x60.png', '72x72.png', '76x76.png', '80x80.png', '87x87.png', '96x96.png', '120x120.png', '144x144.png', '152x152.png', '167x167.png', '180x180.png', '192x192.png', '1024x1024.png' ] const digest = (value) => createHash('sha256').update(value).digest('hex') test('HBuilderX root icons and CLI source icons remain identical', async () => { for (const name of iconNames) { const [rootIcon, sourceIcon] = await Promise.all([ readFile(new URL(`../static/app-icons/${name}`, import.meta.url)), readFile(new URL(`../src/static/app-icons/${name}`, import.meta.url)) ]) assert.equal(digest(rootIcon), digest(sourceIcon), `${name} must match in both icon roots`) } })