Skip to content

Commit

Permalink
chore: Update ava
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Jan 4, 2019
1 parent 66f92af commit de51b5d
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 1,414 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -23,7 +23,7 @@
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"ava": "0.25.0",
"ava": "1.0.1",
"babel-eslint": "^10.0.1",
"babel-plugin-istanbul": "^5.1.0",
"babel-plugin-react-intl": "^3.0.1",
Expand Down Expand Up @@ -90,7 +90,7 @@
"!test/fixtures/**/*",
"!test/helpers/**/*"
],
"source": [
"sources": [
"src/**/*.js"
]
},
Expand Down
16 changes: 8 additions & 8 deletions test/cache.test.js
Expand Up @@ -30,23 +30,23 @@ const globalConfig = {
// Create a separate directory for each test so that the tests
// can run in parallel

test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(outputDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.directory = directory;
t.end();
});
});
test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(cacheDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.cacheDirectory = directory;
t.end();
});
});
test.cb.beforeEach(t => rimraf(defaultCacheDir, t.end));
test.cb.afterEach(t => rimraf(t.context.directory, t.end));
test.cb.afterEach(t => rimraf(t.context.cacheDirectory, t.end));
test.beforeEach.cb(t => rimraf(defaultCacheDir, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.cacheDirectory, t.end));

test.cb("should output files to cache directory", t => {
const config = Object.assign({}, globalConfig, {
Expand Down Expand Up @@ -81,7 +81,7 @@ test.cb("should output files to cache directory", t => {
});
});

test.cb.serial(
test.serial.cb(
"should output json.gz files to standard cache dir by default",
t => {
const config = Object.assign({}, globalConfig, {
Expand Down Expand Up @@ -119,7 +119,7 @@ test.cb.serial(
},
);

test.cb.serial(
test.serial.cb(
"should output non-compressed files to standard cache dir when cacheCompression is set to false",
t => {
const config = Object.assign({}, globalConfig, {
Expand Down Expand Up @@ -156,7 +156,7 @@ test.cb.serial(
},
);

test.cb.serial(
test.serial.cb(
"should output files to standard cache dir if set to true in query",
t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/loader.test.js
Expand Up @@ -26,15 +26,15 @@ const globalConfig = {

// Create a separate directory for each test so that the tests
// can run in parallel
test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(outputDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.directory = directory;
t.end();
});
});

test.cb.afterEach(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));

test.cb("should transpile the code snippet", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/metadata.test.js
Expand Up @@ -37,15 +37,15 @@ const globalConfig = {

// Create a separate directory for each test so that the tests
// can run in parallel
test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(outputDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.directory = directory;
t.end();
});
});

test.cb.afterEach(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));

test.cb("should pass metadata code snippet", t => {
const config = assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/options.test.js
Expand Up @@ -23,15 +23,15 @@ const globalConfig = {

// Create a separate directory for each test so that the tests
// can run in parallel
test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(outputDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.directory = directory;
t.end();
});
});

test.cb.afterEach(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));

test.cb("should interpret options given to the loader", t => {
const config = Object.assign({}, globalConfig, {
Expand Down
4 changes: 2 additions & 2 deletions test/sourcemaps.test.js
Expand Up @@ -23,15 +23,15 @@ const globalConfig = {

// Create a separate directory for each test so that the tests
// can run in parallel
test.cb.beforeEach(t => {
test.beforeEach.cb(t => {
createTestDirectory(outputDir, t.title, (err, directory) => {
if (err) return t.end(err);
t.context.directory = directory;
t.end();
});
});

test.cb.afterEach(t => rimraf(t.context.directory, t.end));
test.afterEach.cb(t => rimraf(t.context.directory, t.end));

test.cb("should output webpack's sourcemap", t => {
const config = Object.assign({}, globalConfig, {
Expand Down

0 comments on commit de51b5d

Please sign in to comment.