mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-23 17:10:25 -05:00
fix: do not check for browser extension in mobile app (#57470)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -49,9 +49,11 @@ assert(document.querySelector('h1').innerText.toLowerCase() === 'catphotoapp');
|
||||
You appear to be using a browser extension that is modifying the page. Be sure to turn off all browser extensions.
|
||||
|
||||
```js
|
||||
assert.isAtMost(document.querySelectorAll('script').length, 2);
|
||||
assert.equal(document.querySelectorAll('style').length, 1);
|
||||
assert.equal(document.querySelectorAll('link').length, 0);
|
||||
if(__checkForBrowserExtensions){
|
||||
assert.isAtMost(document.querySelectorAll('script').length, 2);
|
||||
assert.equal(document.querySelectorAll('style').length, 1);
|
||||
assert.equal(document.querySelectorAll('link').length, 0);
|
||||
}
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -50,9 +50,11 @@ assert.equal(document.querySelector('h1').innerText.toLowerCase(), 'catphotoapp'
|
||||
You appear to be using a browser extension that is modifying the page. Be sure to turn off all browser extensions.
|
||||
|
||||
```js
|
||||
assert.isAtMost(document.querySelectorAll('script').length, 2);
|
||||
assert.equal(document.querySelectorAll('style').length, 1);
|
||||
assert.equal(document.querySelectorAll('link').length, 0);
|
||||
if(__checkForBrowserExtensions){
|
||||
assert.isAtMost(document.querySelectorAll('script').length, 2);
|
||||
assert.equal(document.querySelectorAll('style').length, 1);
|
||||
assert.equal(document.querySelectorAll('link').length, 0);
|
||||
}
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -61,6 +61,7 @@ async function initTestFrame(e: InitTestFrameArg = { code: {} }) {
|
||||
const { default: chai } = await import(/* webpackChunkName: "chai" */ 'chai');
|
||||
const assert = chai.assert;
|
||||
const __helpers = helpers;
|
||||
const __checkForBrowserExtensions = true;
|
||||
/* eslint-enable @typescript-eslint/no-unused-vars */
|
||||
|
||||
let Enzyme;
|
||||
|
||||
Reference in New Issue
Block a user