diff --git a/test/e2e/basic.browser.test.js b/test/e2e/basic.browser.test.js index 9ffea9a6f9..782bd94465 100644 --- a/test/e2e/basic.browser.test.js +++ b/test/e2e/basic.browser.test.js @@ -40,7 +40,13 @@ describe('basic browser', () => { await page.nuxt.navigate('/css') expect(await page.$text('.red')).toBe('This is red') - expect(await page.$eval('.red', red => window.getComputedStyle(red).color)).toBe('rgb(255, 0, 0)') + expect(await page.$eval('.red', red => { + const { color, backgroundColor } = window.getComputedStyle(red) + return { color, backgroundColor } + })).toEqual({ + color: 'rgb(255, 0, 0)', + backgroundColor: 'rgb(0, 0, 255)' + }) }) test.skip('/stateful', async () => { diff --git a/test/fixtures/basic/nuxt.config.js b/test/fixtures/basic/nuxt.config.js index 3cc0c57e0c..65abaddd64 100644 --- a/test/fixtures/basic/nuxt.config.js +++ b/test/fixtures/basic/nuxt.config.js @@ -36,7 +36,11 @@ export default { build: { scopeHoisting: true, postcss: [ - require('postcss-preset-env')() + require('postcss-preset-env')({ + features: { + 'custom-selectors': true + } + }) ] } }