style(eslint): add eslint-plugin-n (#12393)

This commit is contained in:
Tony
2023-04-27 05:16:11 +08:00
committed by GitHub
parent da0cab5e90
commit 5b6d7cb524
21 changed files with 254 additions and 122 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ describe('rand-user-agent', () => {
const uaArr = Array(100)
.fill()
.map(() => randUserAgent({ browser: 'chrome', os: 'windows' }));
const match = uaArr.find((e) => (e.includes('Chrome-Lighthouse') || e.includes('HeadlessChrome') ? true : false));
const match = uaArr.find((e) => !!(e.includes('Chrome-Lighthouse') || e.includes('HeadlessChrome')));
expect(match).toBeFalsy();
});