diff --git a/tests/index.html b/tests/index.html index 6e0ba09f..a5ba42c9 100644 --- a/tests/index.html +++ b/tests/index.html @@ -86,6 +86,7 @@

Platform Tests

  • MutationObserver
  • Navigator
  • Node
  • +
  • No Partytown
  • ResizeObserver
  • Screen
  • Script
  • diff --git a/tests/platform/no-partytown-script/index.html b/tests/platform/no-partytown-script/index.html new file mode 100644 index 00000000..134c22ea --- /dev/null +++ b/tests/platform/no-partytown-script/index.html @@ -0,0 +1,92 @@ + + + + + + + No Partytown Script + + + + + + +

    No Partytown Script

    + +

    + Tests initializing Partytown, however, the page has no text/partytown scripts. Ensure there's + no runtime errors. +

    + + + +
    +

    All Tests

    + + diff --git a/tests/platform/no-partytown-script/no-partytown-script.spec.ts b/tests/platform/no-partytown-script/no-partytown-script.spec.ts new file mode 100644 index 00000000..508053db --- /dev/null +++ b/tests/platform/no-partytown-script/no-partytown-script.spec.ts @@ -0,0 +1,8 @@ +import { test, expect } from '@playwright/test'; + +test('no-partytown-script', async ({ page }) => { + await page.goto('/tests/platform/no-partytown-script/'); + + const testPageErrors = page.locator('#testPageErrors'); + await expect(testPageErrors).toHaveText('--'); +});