You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/tracker/test/hash-exclusions.spec.js

14 lines
526 B
JavaScript

const { test } = require('./support/harness');
const { mockRequest } = require('./support/test-utils')
const { expect } = 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()
});
});