Skip to content

Commit

Permalink
test(gatsby-ssr spec): added a test for /page-data/ JSON files being …
Browse files Browse the repository at this point in the history
…removed
  • Loading branch information
itmayziii committed Oct 1, 2019
1 parent 7b7f5a4 commit f3faf88
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/fake-data.spec.ts
Expand Up @@ -161,6 +161,19 @@ export const headComponentsData = [
crossOrigin: 'use-credentials'
},
_owner: null
},
{ // 15
type: 'link',
key: '/page-data/welcome/page-data.json',
ref: null,
props:
{
as: 'fetch',
rel: 'preload',
href: '/page-data/welcome/page-data.json',
crossOrigin: 'use-credentials'
},
_owner: null
}
]

Expand Down
2 changes: 1 addition & 1 deletion src/gatsby-ssr.spec.ts
Expand Up @@ -60,7 +60,7 @@ describe('gatsby-ssr.js', (): void => {

onRenderBody({ scripts: [] })
function getHeadComponents (): ReactNode[] {
return [headComponentsData[0], headComponentsData[1], headComponentsData[14]]
return [headComponentsData[0], headComponentsData[1], headComponentsData[14], headComponentsData[15]]
}
function getPostBodyComponents (): ReactNode[] {
return []
Expand Down

0 comments on commit f3faf88

Please sign in to comment.