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`.
This commit is contained in:
Robin Malfait 2021-04-02 20:18:14 +02:00 • committed by Adam Wathan
parent 1c7a848002
commit c8acc1305d
2 changed files with 3 additions and 3 deletions

View file

@ -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')
})
})
})

View file

@ -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')
})
})
})