chore(qdreader): document task matrix and compat

This commit is contained in:
2026-05-20 22:37:28 +08:00
parent e035a760de
commit 46369d9af2
4 changed files with 41 additions and 9 deletions
+25
View File
@@ -70,6 +70,31 @@ function test(name, fn) {
}
}
test('plugin source avoids BigInt literal syntax for older Autman JS parsers', () => {
assert.doesNotMatch(code, /\b\d+n\b/);
});
test('README documents QDReader task schedule windows and required endpoints', () => {
const readme = fs.readFileSync(new URL('../README.md', import.meta.url), 'utf8');
for (const token of [
'cron: 1 7 * * *',
'qdreader_task_pref_json',
'receivegifts',
'mainPage',
'finishWatch',
'packagelist',
'lottery',
'checkinexchangepage',
'exchangegoods',
'chaptercardwithbook',
'20:00-22:00',
'magev6.if.qidian.com/argus/api/v2/message/pullmessage',
'BigInt',
]) assert.match(readme, new RegExp(token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
});
test('manual cookie save masks cookie and stores by uid', () => {
const r = runPlugin({ content: '启点ck ' + cookie });
assert.match(r.replies.join('\n'), /CK新增成功/);