fix: 支持新版 ChatGPT 登录验证码邮件匹配
This commit is contained in:
@@ -81,6 +81,20 @@ return { readOpenedMailBody, extractVerificationCode };
|
||||
assert.equal(api.extractVerificationCode(bodyText), '731091');
|
||||
});
|
||||
|
||||
test('extractVerificationCode matches the new suspicious log-in mail body', () => {
|
||||
const bundle = [
|
||||
extractFunction('extractVerificationCode'),
|
||||
].join('\n');
|
||||
|
||||
const api = new Function(`
|
||||
${bundle}
|
||||
return { extractVerificationCode };
|
||||
`)();
|
||||
|
||||
const bodyText = 'ChatGPT Log-in Code\nWe noticed a suspicious log-in on your account. If that was you, enter this code:\n\n982219';
|
||||
assert.equal(api.extractVerificationCode(bodyText), '982219');
|
||||
});
|
||||
|
||||
test('readOpenedMailBody ignores conversation list rows when no detail pane is open', () => {
|
||||
const bundle = [
|
||||
extractFunction('normalizeText'),
|
||||
|
||||
Reference in New Issue
Block a user