Fixed pages API test snapshot having a flaky cache string (#17391)

no issue

- `x-cache-invalidate` will vary across different runs as the post's preview uuid will be different each time the post is created
This commit is contained in:
Kevin Ansfield 2023-07-17 15:21:00 +02:00 committed by GitHub
parent 135f5fa287
commit 636b1e67b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -404,7 +404,7 @@ Object {
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
"vary": "Accept-Version, Origin, Accept-Encoding",
"x-cache-invalidate": "/p/6b776308-98f3-44eb-931c-0e235024d7f2/",
"x-cache-invalidate": Any<String>,
"x-powered-by": "Express",
}
`;

View File

@ -73,7 +73,8 @@ describe('Pages API', function () {
})
.matchHeaderSnapshot({
'content-version': anyContentVersion,
etag: anyEtag
etag: anyEtag,
'x-cache-invalidate': anyString
});
});
});