Refractoring Stage 6.6 Migrated productivity.js and shortcuts.js mail-state access and render/preferences hooks to the mail feature API.

This commit is contained in:
2026-10-16 21:03:40 +03:00
parent 84a63441ef
commit 38340442f0
21 changed files with 389 additions and 293 deletions
+8
View File
@@ -2,6 +2,7 @@ const test = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const vm = require('node:vm');
const root = path.resolve(__dirname, '..');
const read = file => fs.readFileSync(path.join(root, file), 'utf8');
@@ -27,3 +28,10 @@ test('desktop, Android web generation, and offline cache include renderer suppor
assert.ok(worker.includes(`'./${file}'`), `service worker is missing ${file}`);
}
});
test('classic renderer scripts have no duplicate global lexical declarations', () => {
const html = read('index.html');
const scripts = [...html.matchAll(/<script src="([^"]+)"/g)].map(match => match[1]);
const source = scripts.map(script => read(script)).join('\n');
assert.doesNotThrow(() => new vm.Script(source, { filename: 'renderer-classic-scripts.js' }));
});