diff --git a/package.json b/package.json index 59ca148b..0660b082 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "resolve": "^1.1.7" }, "devDependencies": { - "ava": "^1.0.1", + "ava": "^3.0.0", "eslint": "^5.0.0", "eslint-config-i-am-meticulous": "^11.0.0", "eslint-plugin-import": "^2.17.1", diff --git a/test/custom-load.js b/test/custom-load.js index 9ecd1878..eb306d3b 100644 --- a/test/custom-load.js +++ b/test/custom-load.js @@ -1,8 +1,8 @@ // external tooling -import test from "ava" +const test = require("ava") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test.serial("should accept content", checkFixture, "custom-load", { load: () => "custom-content {}", diff --git a/test/custom-resolve.js b/test/custom-resolve.js index 2ab3e88a..e3aafb32 100644 --- a/test/custom-resolve.js +++ b/test/custom-resolve.js @@ -1,15 +1,15 @@ // builtin tooling -import path from "path" +const path = require("path") // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test.serial("should accept file", checkFixture, "custom-resolve-file", { resolve: () => path.resolve("test/fixtures/imports/custom-resolve-1.css"), diff --git a/test/custom-syntax-parser.js b/test/custom-syntax-parser.js index 975ebc88..a9b66c15 100644 --- a/test/custom-syntax-parser.js +++ b/test/custom-syntax-parser.js @@ -1,10 +1,10 @@ // external tooling -import test from "ava" -import scss from "postcss-scss" -import sugarss from "sugarss" +const test = require("ava") +const scss = require("postcss-scss") +const sugarss = require("sugarss") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test("should process custom syntax", checkFixture, "scss-syntax", null, { syntax: scss, diff --git a/test/filter.js b/test/filter.js index 3b07a3a0..724be5e3 100644 --- a/test/filter.js +++ b/test/filter.js @@ -1,8 +1,8 @@ // external tooling -import test from "ava" +const test = require("ava") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test("should filter all imported stylesheets", checkFixture, "filter-all", { filter: () => false, diff --git a/test/import-events.js b/test/import-events.js index d5486cff..00a0489c 100644 --- a/test/import-events.js +++ b/test/import-events.js @@ -1,13 +1,13 @@ // builtin tooling -import { readFileSync } from "fs" -import { resolve } from "path" +const { readFileSync } = require("fs") +const { resolve } = require("path") // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") test("should add dependency message for each import", t => { return postcss() diff --git a/test/import.js b/test/import.js index 56c6250c..76e9053a 100644 --- a/test/import.js +++ b/test/import.js @@ -1,16 +1,16 @@ // builtin tooling -import { readFileSync } from "fs" -import path from "path" +const { readFileSync } = require("fs") +const path = require("path") // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test("should import stylsheets", checkFixture, "simple") diff --git a/test/lint.js b/test/lint.js index 66c102e5..c6efdce3 100644 --- a/test/lint.js +++ b/test/lint.js @@ -1,9 +1,9 @@ // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") const processor = postcss().use(atImport()) diff --git a/test/media.js b/test/media.js index 78161990..99781fe4 100644 --- a/test/media.js +++ b/test/media.js @@ -1,8 +1,8 @@ // external tooling -import test from "ava" +const test = require("ava") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test( "should resolve media queries of import statements", diff --git a/test/order.js b/test/order.js index 5d690976..d6e405b1 100644 --- a/test/order.js +++ b/test/order.js @@ -1,8 +1,8 @@ // external tooling -import test from "ava" +const test = require("ava") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test(`should order nested imports correctly`, t => { let first = true diff --git a/test/plugins.js b/test/plugins.js index f5664cb0..c8b63b43 100644 --- a/test/plugins.js +++ b/test/plugins.js @@ -1,12 +1,12 @@ // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test("should apply plugins to root", t => { const atRules = [] diff --git a/test/resolve.js b/test/resolve.js index 5cf72ddc..36475414 100644 --- a/test/resolve.js +++ b/test/resolve.js @@ -1,8 +1,8 @@ // external tooling -import test from "ava" +const test = require("ava") // internal tooling -import checkFixture from "./helpers/check-fixture" +const checkFixture = require("./helpers/check-fixture") test("should resolve relative to cwd", checkFixture, "resolve-cwd", { path: null, diff --git a/test/syntax-error.js b/test/syntax-error.js index 18d6bfb1..feba2c0a 100644 --- a/test/syntax-error.js +++ b/test/syntax-error.js @@ -1,12 +1,12 @@ // builtin tooling -import fs from "fs" +const fs = require("fs") // external tooling -import test from "ava" -import postcss from "postcss" +const test = require("ava") +const postcss = require("postcss") // plugin -import atImport from ".." +const atImport = require("..") test("SyntaxError in imported file throws", t => { return postcss(atImport({ path: "test/fixtures/imports" }))