From c8acc1305ddae9d9b97d9a84691cb5c5ab5cb09d Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 2 Apr 2021 20:18:14 +0200 Subject: [PATCH] check for different -webkit prefix test The tests started failing because `-webkit-max-content` is not needed anymore. So instead we are now checking for `-webkit-background-clip`. If this happens in the future, we could check for ` -webkit-` (notice the space in front) so that we dont test for hardcoded `::-webkit-inner-spin-button`. --- __tests__/cli.compile.test.js | 2 +- __tests__/cli.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/cli.compile.test.js b/__tests__/cli.compile.test.js index 4e44441d2..dc93a0702 100644 --- a/__tests__/cli.compile.test.js +++ b/__tests__/cli.compile.test.js @@ -13,7 +13,7 @@ describe('cli compile', () => { it('compiles CSS file', () => { return compile({ inputFile, outputFile, plugins }).then((result) => { expect(result.css).toContain('.example') - expect(result.css).toContain('-webkit-max-content') + expect(result.css).toContain('-webkit-background-clip') }) }) }) diff --git a/__tests__/cli.test.js b/__tests__/cli.test.js index e86ebae1e..b464c2749 100644 --- a/__tests__/cli.test.js +++ b/__tests__/cli.test.js @@ -109,13 +109,13 @@ describe('cli', () => { it('compiles CSS file with autoprefixer', () => { return cli(['build', inputCssPath]).then(() => { - expect(process.stdout.write.mock.calls[0][0]).toContain('-webkit-max-content') + expect(process.stdout.write.mock.calls[0][0]).toContain('-webkit-background-clip') }) }) it('compiles CSS file without autoprefixer', () => { return cli(['build', inputCssPath, '--no-autoprefixer']).then(() => { - expect(process.stdout.write.mock.calls[0][0]).not.toContain('-webkit-max-content') + expect(process.stdout.write.mock.calls[0][0]).not.toContain('-webkit-background-clip') }) }) })