test(doctor): isolate gmail missing-token check from host auth store
This commit is contained in:
@@ -174,9 +174,15 @@ models:
|
|||||||
|
|
||||||
it('reports WARN for Gmail when token missing', async () => {
|
it('reports WARN for Gmail when token missing', async () => {
|
||||||
mkdirSync(testDir, { recursive: true });
|
mkdirSync(testDir, { recursive: true });
|
||||||
|
process.env.HOME = testDir;
|
||||||
const configPath = join(testDir, 'config.yaml');
|
const configPath = join(testDir, 'config.yaml');
|
||||||
const credsPath = join(testDir, 'gmail-creds.json');
|
const credsPath = join(testDir, 'gmail-creds.json');
|
||||||
writeFileSync(credsPath, '{}');
|
writeFileSync(credsPath, '{}');
|
||||||
|
mkdirSync(join(testDir, '.config/flynn'), { recursive: true });
|
||||||
|
writeFileSync(
|
||||||
|
join(testDir, '.config/flynn/auth.json'),
|
||||||
|
JSON.stringify({}),
|
||||||
|
);
|
||||||
writeFileSync(configPath, `
|
writeFileSync(configPath, `
|
||||||
telegram:
|
telegram:
|
||||||
bot_token: "test-token"
|
bot_token: "test-token"
|
||||||
|
|||||||
Reference in New Issue
Block a user