Skip to content

Commit b9dec64

Browse files
committed
Update tests to prevent PostCSS warnings
1 parent c792f0a commit b9dec64

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/__tests__/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import postcss from 'postcss';
33

44
import reduceCalc from '../../dist';
55

6+
const postcssOpts = { from: undefined }
7+
68
function testValue(t, fixture, expected = null, opts = {}) {
79
if (expected === null) {
810
expected = fixture;
@@ -17,14 +19,14 @@ function testCss(t, fixture, expected = null, opts = {}) {
1719
expected = fixture;
1820
}
1921
t.plan(1);
20-
return postcss(reduceCalc(opts)).process(fixture, { from: undefined }).then(result => {
22+
return postcss(reduceCalc(opts)).process(fixture, postcssOpts).then(result => {
2123
t.deepEqual(result.css, expected);
2224
});
2325
}
2426

2527
async function testThrows(t, fixture, expected, opts) {
2628
fixture = `foo{bar:${fixture}}`;
27-
await t.throwsAsync(() => postcss(reduceCalc(opts)).process(fixture), expected);
29+
await t.throwsAsync(() => postcss(reduceCalc(opts)).process(fixture, postcssOpts), expected);
2830
}
2931

3032
test(

0 commit comments

Comments
 (0)