chore(qdreader): document task matrix and compat
This commit is contained in:
@@ -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新增成功/);
|
||||
|
||||
Reference in New Issue
Block a user