Skip to content

Commit

Permalink
test: remove unreliable font test (#47714)
Browse files Browse the repository at this point in the history
x-ref:
#47674 (comment)

as discussed with @ijjk , we decided to remove the test as it's not
reailable due to random updates from google endpoint
  • Loading branch information
huozhi authored Mar 30, 2023
1 parent 0616f1b commit dbc4320
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions test/integration/font-optimization/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,36 +177,6 @@ describe('Font Optimization', () => {
}
})

it('should minify the css', async () => {
const snapshotJson = JSON.parse(
await fs.readFile(join(appDir, 'manifest-snapshot.json'), {
encoding: 'utf-8',
})
)
const testJson = JSON.parse(
await fs.readFile(builtPage('font-manifest.json'), {
encoding: 'utf-8',
})
)
const normalizeContent = (content) => {
return content.replace(/\/v[\d]{1,}\//g, '/v0/')
}
const testCss = {}
testJson.forEach((fontDefinition) => {
testCss[fontDefinition.url] = normalizeContent(
fontDefinition.content
)
})
const snapshotCss = {}
snapshotJson.forEach((fontDefinition) => {
snapshotCss[fontDefinition.url] = normalizeContent(
fontDefinition.content
)
})

expect(testCss).toStrictEqual(snapshotCss)
})

// Re-run build to check if it works when build is cached
it('should work when build is cached', async () => {
await nextBuild(appDir)
Expand Down

0 comments on commit dbc4320

Please sign in to comment.