diff --git a/test/test_mytime.mjs b/test/test_mytime.mjs index 195482d..d05fb00 100644 --- a/test/test_mytime.mjs +++ b/test/test_mytime.mjs @@ -42,4 +42,10 @@ const must = ['>10:00<', '>4:55<', '>14:55<', 'осталось 5:05', 'T for (const s of must) if (!html.includes(s)) throw new Error('missing ' + s + '\n' + html); if (html.includes('#3')) throw new Error('September record counted'); if (calls.filter(c => c === 'task.elapseditem.getlist').length !== 3) throw new Error('pages: ' + calls); + +// норма превышена: 14:55 при норме 10 ч +globalThis.myTimeConfig = { norm: 10 }; +eval(fs.readFileSync(new URL('../extension/mytime.js', import.meta.url), 'utf8')); +await new Promise(r => setTimeout(r, 50)); +if (!els['mytime-out'].innerHTML.includes('Норма 10 ч выполнена, сверх нормы 4:55')) throw new Error('over norm\n' + els['mytime-out'].innerHTML); console.log('ok');