mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 00:53:55 +00:00
bc9071663f
* fix(deps): update all non-major dependencies * Update package.json * fix(deps): lock file update * fix test due to changed css attribute order
16 lines
801 B
JavaScript
16 lines
801 B
JavaScript
import { resolve } from 'path'
|
|
import fs from 'fs'
|
|
import { promisify } from 'util'
|
|
|
|
const readFile = promisify(fs.readFile)
|
|
|
|
describe('extract css', () => {
|
|
// TODO: make css chunk name predictive
|
|
test('Verify global.css has been extracted and minified', async () => {
|
|
const pathToMinifiedGlobalCss = resolve(__dirname, '..', 'fixtures/extract-css/.nuxt/dist/client/7dc53e76acc7df734a24.css')
|
|
const content = await readFile(pathToMinifiedGlobalCss, 'utf-8')
|
|
const expectedContent = 'h1[data-v-180e2718]{color:red}.container[data-v-180e2718]{display:-ms-grid;display:grid;-ms-grid-columns:60px 60px 60px 60px 60px;grid-template-columns:60px 60px 60px 60px 60px;-ms-grid-rows:30px 30px;grid-template-rows:30px 30px;grid-auto-flow:row}'
|
|
expect(content).toBe(expectedContent)
|
|
})
|
|
})
|