Skip to content

Commit d0a161f

Browse files
committed
Add test for referrer when using push state
1 parent ab7af1d commit d0a161f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test-pushstate.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { expect } = require("chai");
22
const UUIDvalidate = require("uuid-validate");
3-
const { CI } = require("./constants");
43
const { getRequests } = require("./helpers");
54

65
module.exports = async () => {
@@ -31,6 +30,9 @@ module.exports = async () => {
3130
"project=project_x"
3231
);
3332

33+
// Seconds page referrer should be the first page (ending with /)
34+
expect(pageViewRequests[1].body.referrer).to.be.a("string").and.match(/\/$/i);
35+
3436
pageViewRequests.map((request) => {
3537
expect(
3638
request,

0 commit comments

Comments
 (0)