Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 41623ae

Browse files
authored
Merge pull request #357 from KnisterPeter/greenkeeper/ava-0.19.0
Update ava to the latest version 🚀
2 parents 4ae1f25 + 28bc9c4 commit 41623ae

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@types/diff": "0.0.31",
4343
"@types/node": "7.0.12",
4444
"@types/react": "15.0.21",
45-
"ava": "0.18.2",
45+
"ava": "0.19.0",
4646
"babel-core": "6.24.0",
4747
"babel-preset-es2015": "6.24.0",
4848
"babel-register": "6.24.0",

tests/parsing-test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import test, { ContextualTestContext } from 'ava';
1+
import test, { TestContext } from 'ava';
22

33
import * as chalk from 'chalk';
44
import * as diff from 'diff';
@@ -18,7 +18,7 @@ function normalize(input: string): string {
1818
.replace(/ => /g, '=>');
1919
}
2020

21-
function textDiff(t: ContextualTestContext, actual: string, expected: string): void {
21+
function textDiff(t: TestContext, actual: string, expected: string): void {
2222
if (diff.diffChars(normalize(expected), normalize(actual)).length > 1) {
2323
const differences = diff.diffChars(expected, actual);
2424
const result = differences
@@ -28,10 +28,12 @@ function textDiff(t: ContextualTestContext, actual: string, expected: string): v
2828
})
2929
.join('');
3030
t.fail(`\n${result}`);
31+
} else {
32+
t.pass();
3133
}
3234
}
3335

34-
function compare(t: ContextualTestContext, moduleName: string|null, file1: string, file2: string,
36+
function compare(t: TestContext, moduleName: string|null, file1: string, file2: string,
3537
opts: react2dts.IOptions = {}, reactImport = 'react'): void {
3638
textDiff(
3739
t,

0 commit comments

Comments
 (0)