Skip to content

Commit

Permalink
test: fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 24, 2024
1 parent fbd9891 commit 1353ca7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions packages/core/src/page/createPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ export const createPage = async (
key,
})

const {
chunkFilePath: dataFilePath,
chunkFilePathRelative: dataFilePathRelative,
chunkName: dataFileChunkName,
} = resolvePageChunkInfo({ app, htmlFilePathRelative, key })
const { chunkFilePath, chunkFilePathRelative, chunkName } =
resolvePageChunkInfo({ app, htmlFilePathRelative, key })

const page: Page = {
// page data
Expand Down Expand Up @@ -141,9 +138,9 @@ export const createPage = async (
componentFilePath,
componentFilePathRelative,
componentFileChunkName,
chunkFilePath: dataFilePath,
chunkFilePathRelative: dataFilePathRelative,
chunkName: dataFileChunkName,
chunkFilePath,
chunkFilePathRelative,
chunkName,
htmlFilePath,
htmlFilePathRelative,

Expand Down
6 changes: 3 additions & 3 deletions packages/core/tests/page/resolvePageDataInfo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe('core > page > resolvePageDataInfo', () => {
htmlFilePathRelative,
}),
).toEqual({
dataFilePath: expectedFilePath,
dataFilePathRelative: path.relative(app.dir.temp(), expectedFilePath),
dataFileChunkName: key,
chunkFilePath: expectedFilePath,
chunkFilePathRelative: path.relative(app.dir.temp(), expectedFilePath),
chunkName: key,
})
})
})

0 comments on commit 1353ca7

Please sign in to comment.