@@ -13,7 +13,9 @@ test.describe('Dynamic CMS', () => {
13
13
'"Next.js"; fwd=miss, "Netlify Durable"; fwd=uri-miss; stored, "Netlify Edge"; fwd=miss' ,
14
14
)
15
15
expect ( headers1 [ 'netlify-cache-tag' ] ) . toEqual ( '_n_t_/content/blog' )
16
- expect ( headers1 [ 'netlify-cdn-cache-control' ] ) . toEqual ( 's-maxage=31536000, durable' )
16
+ expect ( headers1 [ 'netlify-cdn-cache-control' ] ) . toMatch (
17
+ / s - m a x a g e = 3 1 5 3 6 0 0 0 , ( s t a l e - w h i l e - r e v a l i d a t e = 3 1 5 3 6 0 0 0 , ) ? d u r a b l e /
18
+ )
17
19
18
20
// 2. Publish the blob, revalidate the dynamic page, and wait to regenerate
19
21
await page . goto ( new URL ( '/cms/publish' , dynamicCms . url ) . href )
@@ -30,7 +32,9 @@ test.describe('Dynamic CMS', () => {
30
32
/ " N e x t .j s " ; h i t , " N e t l i f y D u r a b l e " ; f w d = s t a l e ; t t l = [ 0 - 9 ] + ; s t o r e d , " N e t l i f y E d g e " ; f w d = s t a l e / ,
31
33
)
32
34
expect ( headers2 [ 'netlify-cache-tag' ] ) . toEqual ( '_n_t_/content/blog' )
33
- expect ( headers2 [ 'netlify-cdn-cache-control' ] ) . toEqual ( 's-maxage=31536000, durable' )
35
+ expect ( headers2 [ 'netlify-cdn-cache-control' ] ) . toMatch (
36
+ / s - m a x a g e = 3 1 5 3 6 0 0 0 , ( s t a l e - w h i l e - r e v a l i d a t e = 3 1 5 3 6 0 0 0 , ) ? d u r a b l e /
37
+ )
34
38
35
39
// 4. Unpublish the blob, revalidate the dynamic page, and wait to regenerate
36
40
await page . goto ( new URL ( '/cms/unpublish' , dynamicCms . url ) . href )
@@ -47,6 +51,8 @@ test.describe('Dynamic CMS', () => {
47
51
/ " N e x t .j s " ; f w d = m i s s , " N e t l i f y D u r a b l e " ; f w d = s t a l e ; t t l = [ 0 - 9 ] + ; s t o r e d , " N e t l i f y E d g e " ; f w d = s t a l e / ,
48
52
)
49
53
expect ( headers3 [ 'netlify-cache-tag' ] ) . toEqual ( '_n_t_/content/blog' )
50
- expect ( headers3 [ 'netlify-cdn-cache-control' ] ) . toEqual ( 's-maxage=31536000, durable' )
54
+ expect ( headers3 [ 'netlify-cdn-cache-control' ] ) . toMatch (
55
+ / s - m a x a g e = 3 1 5 3 6 0 0 0 , ( s t a l e - w h i l e - r e v a l i d a t e = 3 1 5 3 6 0 0 0 , ) ? d u r a b l e /
56
+ )
51
57
} )
52
58
} )
0 commit comments