title: jest-expo-puppeteer - Getting "Oh no! It looks like JavaScript is not enabled in your browser"
body: <p>When I run a very simple sample test in <code>jest-expo-puppeteer</code> following the guidelines in <a href="https://github.com/expo/expo/tree/master/packages/jest-expo-puppeteer" rel="nofollow noreferrer">jest-expo-puppeteer documentation</a>, I keep getting a log of weird errors, and it seems none of the elements expected could be found. So I tried to print out the page:</p>
  <pre><code>// Import the config so we can find the host URL
  import config from '../../jest-puppeteer.config'
  
  let response
  
  beforeEach(async () =&gt; {
    // Jest puppeteer exposes the page object from Puppeteer
    response = await page.goto(config.url)
  })
  
  it(`should have welcome string`, async () =&gt; {
    const html = await page.evaluate(() =&gt; document.documentElement.outerHTML)
    console.log(html)
    await expect(page).toMatchElement('div[data-testid=&quot;welcome&quot;]', { text: 'Welcome!' })
  })
  
  </code></pre>
  <p>The result of the page shows the text <code>Oh no! It looks like JavaScript is not enabled in your browser.</code>:</p>
  <pre><code>...
        &lt;body&gt;
            &lt;!-- 
              A generic no script element with a reload button and a message.
              Feel free to customize this however you'd like.
            --&gt;
            &lt;noscript&gt;
              &lt;form
                action=&quot;&quot;
                style=&quot;background-color:#fff;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;&quot;
              &gt;
                &lt;div
                  style=&quot;font-size:18px;font-family:Helvetica,sans-serif;line-height:24px;margin:10%;width:80%;&quot;
                &gt;
                  &lt;p&gt;Oh no! It looks like JavaScript is not enabled in your browser.&lt;/p&gt;
                  &lt;p style=&quot;margin:20px 0;&quot;&gt;
                    &lt;button
                      type=&quot;submit&quot;
                      style=&quot;background-color: #4630EB; border-radius: 100px; border: none; box-shadow: none; color: #fff; cursor: pointer; font-weight: bold; line-height: 20px; padding: 6px 16px;&quot;
                    &gt;
                      Reload
                    &lt;/button&gt;
                  &lt;/p&gt;
                &lt;/div&gt;
              &lt;/form&gt;
            &lt;/noscript&gt;
            &lt;!-- The root element for your Expo app. --&gt;
            &lt;div id=&quot;root&quot;&gt;&lt;div class=&quot;css-view-1dbjc4n r-flex-13awgt0 r-pointerEvents-12vffkv&quot;&gt;&lt;div class=&quot;css-view-1dbjc4n r-flex-13awgt0 r-pointerEvents-12vffkv&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
          &lt;script src=&quot;/static/js/bundle.js&quot;&gt;&lt;/script&gt;
        
        &lt;/body&gt;&lt;/html&gt;
  ...
  </code></pre>
  <p>This happens for both headless and in-browser execution.</p>
  <p>So it looks like Javascript is turned off. The <code>page</code> object is created internally by <code>jest-expo-puppeteer</code>, so I wonder:</p>
  <ul>
  <li><strong>How to turn on JavaScript in <code>jest-expo-puppeteer</code>?</strong></li>
  <li><strong>Shouldn't this be turned on by default? Perhaps there is something that I missed out in my setup?</strong></li>
  </ul>