feat: add configurable operation delay

This commit is contained in:
root
2026-05-08 12:50:20 -04:00
parent 872f382815
commit c23461261b
44 changed files with 4770 additions and 193 deletions
@@ -0,0 +1,22 @@
const test = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
test('confirm-oauth and platform-verify stay free of operation delay gate calls', () => {
for (const file of [
'background/steps/confirm-oauth.js',
'background/steps/platform-verify.js',
'background/panel-bridge.js',
'content/sub2api-panel.js',
]) {
const source = fs.readFileSync(file, 'utf8');
assert.doesNotMatch(source, /performOperationWithDelay\(/, `${file} must not call the operation delay gate`);
assert.doesNotMatch(source, /content\/operation-delay\.js/, `${file} must not inject operation delay`);
}
});
test('operation delay gate names exactly the two excluded step keys', () => {
const source = fs.readFileSync('content/operation-delay.js', 'utf8');
assert.match(source, /confirm-oauth/);
assert.match(source, /platform-verify/);
});