Skip to content

Commit 6b0666e

Browse files
Update ava to version 3.1.0 (#309)
* chore(package): update ava to version 3.1.0 Closes #308 * Remove ava helpers option * Remove import/export usage in tests; since ava no longer includes Babel Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
1 parent 9fb5dbe commit 6b0666e

File tree

22 files changed

+95
-100
lines changed

22 files changed

+95
-100
lines changed

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"yargs": "^15.0.2"
3333
},
3434
"devDependencies": {
35-
"ava": "^2.4.0",
35+
"ava": "^3.1.0",
3636
"coveralls": "^3.0.0",
3737
"eslint": "^6.8.0",
3838
"eslint-config-problems": "3.1.0",
@@ -70,10 +70,5 @@
7070
"url": "https://github.com/postcss/postcss-cli/issues"
7171
},
7272
"homepage": "https://github.com/postcss/postcss-cli#readme",
73-
"license": "MIT",
74-
"ava": {
75-
"helpers": [
76-
"test/helpers/*"
77-
]
78-
}
73+
"license": "MIT"
7974
}

test/base.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import test from 'ava'
2-
import path from 'path'
1+
const test = require('ava')
2+
const path = require('path')
33

4-
import cli from './helpers/cli.js'
5-
import tmp from './helpers/tmp.js'
6-
import read from './helpers/read.js'
4+
const cli = require('./helpers/cli.js')
5+
const tmp = require('./helpers/tmp.js')
6+
const read = require('./helpers/read.js')
77

88
test('--base --dir works', async t => {
99
const dir = tmp()

test/cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import test from 'ava'
1+
const test = require('ava')
22

3-
import cli from './helpers/cli.js'
4-
import tmp from './helpers/tmp.js'
5-
import read from './helpers/read.js'
3+
const cli = require('./helpers/cli.js')
4+
const tmp = require('./helpers/tmp.js')
5+
const read = require('./helpers/read.js')
66

77
test('works with defaults', async t => {
88
const output = tmp('output.css')

test/config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import test from 'ava'
2-
import path from 'path'
1+
const test = require('ava')
2+
const path = require('path')
33

4-
import ENV from './helpers/env.js'
4+
const ENV = require('./helpers/env.js')
55

6-
import cli from './helpers/cli.js'
7-
import read from './helpers/read.js'
6+
const cli = require('./helpers/cli.js')
7+
const read = require('./helpers/read.js')
88

99
test('supports common config', async t => {
1010
const env = `module.exports = {

test/dir.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import test from 'ava'
2-
import path from 'path'
1+
const test = require('ava')
2+
const path = require('path')
33

4-
import cli from './helpers/cli.js'
5-
import tmp from './helpers/tmp.js'
6-
import read from './helpers/read.js'
4+
const cli = require('./helpers/cli.js')
5+
const tmp = require('./helpers/tmp.js')
6+
const read = require('./helpers/read.js')
77

88
test('--dir works', async t => {
99
const dir = tmp()

test/error.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava'
1+
const test = require('ava')
22

3-
import tmp from './helpers/tmp.js'
4-
import cli from './helpers/cli.js'
3+
const tmp = require('./helpers/tmp.js')
4+
const cli = require('./helpers/cli.js')
55

66
test('multiple input files && --output', t => {
77
return cli(['test/fixtures/*.css', '-o', tmp()]).then(({ error, code }) => {

test/ext.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import test from 'ava'
1+
const test = require('ava')
22

3-
import fs from 'fs-extra'
4-
import path from 'path'
3+
const fs = require('fs-extra')
4+
const path = require('path')
55

6-
import cli from './helpers/cli.js'
7-
import tmp from './helpers/tmp.js'
6+
const cli = require('./helpers/cli.js')
7+
const tmp = require('./helpers/tmp.js')
88

99
test('--ext works', async t => {
1010
const dir = tmp()

test/glob.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import test from 'ava'
2-
import path from 'path'
1+
const test = require('ava')
2+
const path = require('path')
33

4-
import cli from './helpers/cli.js'
5-
import tmp from './helpers/tmp.js'
6-
import read from './helpers/read.js'
4+
const cli = require('./helpers/cli.js')
5+
const tmp = require('./helpers/tmp.js')
6+
const read = require('./helpers/read.js')
77

88
test('works with glob patterns', async t => {
99
const output = tmp()

test/helpers/cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import path from 'path'
2-
import { exec } from 'child_process'
1+
const path = require('path')
2+
const { exec } = require('child_process')
33

4-
export default function(args, cwd) {
4+
module.exports = function(args, cwd) {
55
return new Promise(resolve => {
66
exec(
77
`node ${path.resolve('bin/postcss')} ${args.join(' ')}`,

test/helpers/env.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import fs from 'fs-extra'
2-
import path from 'path'
3-
import globby from 'globby'
1+
const fs = require('fs-extra')
2+
const path = require('path')
3+
const globby = require('globby')
44

5-
import tmp from './tmp.js'
5+
const tmp = require('./tmp.js')
66

7-
export default function(config, fixtures) {
7+
module.exports = function(config, fixtures) {
88
fixtures = fixtures || '**/*'
99
const dir = tmp()
1010

0 commit comments

Comments
 (0)