Skip to content

Commit

Permalink
Test: Print when shopify simulation is used next to body arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
dieulot committed Mar 7, 2023
1 parent 2de17f6 commit 33ccd06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ async function requestListener(req, res) {
const matches = content.match(/<body([^>]*)>/)
const openingBodyTagEscaped = matches[1].replace('<', '&lt;').replace('>', '&gt;')
content = content.replace('<inspag-body>', `<inspag-body>${openingBodyTagEscaped}`)
if (VARY_ACCEPT == 'Simulate Shopify') {
content = content.replace('</inspag-body>', ' (window.Shopify)</inspag-body>')
}

content += `<h1>Page ${page}</h1>`
for (let i = 1; i <= 3; i++) {
Expand Down

0 comments on commit 33ccd06

Please sign in to comment.