Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Nov 8, 2021
1 parent 2f54c9a commit 8c5ee5f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/integration/scss/test/index.test.js
Expand Up @@ -768,19 +768,15 @@ describe('SCSS Support', () => {

it(`should've emitted expected files`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const mediaFolder = join(appDir, '.next/static/media')

const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))

expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch(
/^\.red-text\{color:red;background-image:url\("data:[^)"]+"\)\}$/
/^\.red-text\{color:red;background-image:url\("data:[^"]+"\)\}$/
)

const mediaFiles = await readdir(mediaFolder)
expect(mediaFiles.length).toBe(0)
})
})

Expand Down

0 comments on commit 8c5ee5f

Please sign in to comment.