diff --git a/src/bot.test.ts b/src/bot.test.ts index e8aac59..64741ae 100644 --- a/src/bot.test.ts +++ b/src/bot.test.ts @@ -92,12 +92,12 @@ test('"" languages means bot', () => { expect(botDetectionService.isBot()).toBe(BotReason.EmptyLanguages) }) -test('Chrome without chrome means bot', () => { - globalThis.navigator = { - userAgent: userAgentChrome, - } as Navigator - expect(botDetectionService.isBot()).toBe(BotReason.ChromeWithoutChrome) -}) +// test('Chrome without chrome means bot', () => { +// globalThis.navigator = { +// userAgent: userAgentChrome, +// } as Navigator +// expect(botDetectionService.isBot()).toBe(BotReason.ChromeWithoutChrome) +// }) // This test helps with coverage, while not really testing anything useful test('cdp in jest looks like a bot, because it does error serialization', () => { diff --git a/src/bot.ts b/src/bot.ts index 4462331..bcb483b 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -47,9 +47,10 @@ class BotDetectionService { // isChrome is true if the browser is Chrome, Chromium or Opera // this is "the chrome test" from https://intoli.com/blog/not-possible-to-block-chrome-headless/ // this property is for some reason not present by default in headless chrome - if (userAgent.includes('Chrome') && !(globalThis as any).chrome) { - return BotReason.ChromeWithoutChrome // Headless Chrome - } + // Kirill: criterium removed due to false positives with Android + // if (userAgent.includes('Chrome') && !(globalThis as any).chrome) { + // return BotReason.ChromeWithoutChrome // Headless Chrome + // } } /**