analytics/tracker/test/hash-exclusions.spec.js

13 lines
485 B
JavaScript
Raw Normal View History

const { mockRequest } = require('./support/test-utils')
const { expect, test } = require('@playwright/test');
test.describe('combination of hash and exclusions script extensions', () => {
test('excludes by hash part of the URL', async ({ page }) => {
const plausibleRequestMock = mockRequest(page, '/api/event')
await page.goto('/hash-exclusions.html#this/hash/should/be/ignored');
expect(await plausibleRequestMock, "should not have sent event").toBeNull()
});
});