Skip to content

Commit 0680212

Browse files
authored
Merge pull request #18 from marzelin/master
upgrade tests to work with ava >=0.18
2 parents a7bc60b + 4e0af70 commit 0680212

File tree

5 files changed

+3315
-6
lines changed

5 files changed

+3315
-6
lines changed

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
"partial"
1212
],
1313
"author": "Bogdan Chadkin <trysound@yandex.ru>",
14-
"contributors": [{
15-
"name": "Simon Smith",
16-
"url": "https://simonsmith.io",
17-
"email": "me@simonsmith.io"
18-
}],
14+
"contributors": [
15+
{
16+
"name": "Simon Smith",
17+
"url": "https://simonsmith.io",
18+
"email": "me@simonsmith.io"
19+
}
20+
],
1921
"license": "MIT",
2022
"repository": "TrySound/postcss-easy-import",
2123
"bugs": {
@@ -33,7 +35,7 @@
3335
"resolve": "^1.1.7"
3436
},
3537
"devDependencies": {
36-
"ava": "^0.16.0",
38+
"ava": "^0.19.1",
3739
"eslint": "^3.11.1",
3840
"eslint-config-postcss": "^2.0.0"
3941
},

test/easy-import.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import postcss from 'postcss';
55

66
const msg = err => 'postcss-easy-import: ' + err;
77

8+
// for tests to work with ava >=0.18
9+
process.chdir(__dirname);
10+
811
function preprocess(input, output, opts, t) {
912
return postcss([ easyImport(opts) ]).process(input)
1013
.then(result => {

test/resolve-glob.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import resolveGlob from '../lib/resolve-glob.js';
44

55
const resolve = p => path.resolve('fixtures/glob', p);
66

7+
// for tests to work with ava >=0.18
8+
process.chdir(__dirname);
9+
710
test('should resolve relative globs', t => {
811
return resolveGlob('relative.*', path.resolve('fixtures/glob'), {
912
extensions: ['.css', '.scss'],

test/resolve-module.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import resolveModule from '../lib/resolve-module.js';
44

55
const resolve = p => path.resolve('fixtures/module', p);
66

7+
// for tests to work with ava >=0.18
8+
process.chdir(__dirname);
9+
710
test('should resolve file (css)', t => {
811
return resolveModule('index', path.resolve('fixtures/module'), {
912
extensions: ['.css', '.scss']

0 commit comments

Comments
 (0)