Skip to content

Commit 40a8eff

Browse files
👕 refactor: Lint test files.
1 parent 2e903a4 commit 40a8eff

File tree

10 files changed

+63
-63
lines changed

10 files changed

+63
-63
lines changed

test/src/boolean.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as predicate from '../../src';
33

44
test( "boolean" , t => {
55

6-
t.truthy( predicate.truth( ) , "truth" ) ;
7-
t.truthy( !predicate.untruth( ) , "untruth" ) ;
6+
t.true( predicate.truth( ) , "truth" ) ;
7+
t.true( !predicate.untruth( ) , "untruth" ) ;
88

99
} ) ;

test/src/conjunction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.conjunction( f , g ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , f( x ) && g( x ) , util.format("fg( %s ) === f( %s ) && g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , f( x ) && g( x ) , format("fg( %s ) === f( %s ) && g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "conjunction" , t => {

test/src/conjunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.conjunctions( [ f , g ] ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , f( x ) && g( x ) , util.format("fg( %s ) === f( %s ) && g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , f( x ) && g( x ) , format("fg( %s ) === f( %s ) && g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "conjunctions" , t => {

test/src/disjunction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.disjunction( f , g ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , f( x ) || g( x ) , util.format("fg( %s ) === f( %s ) || g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , f( x ) || g( x ) , format("fg( %s ) === f( %s ) || g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "disjunction" , t => {

test/src/disjunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.disjunctions( [ f , g ] ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , f( x ) || g( x ) , util.format("fg( %s ) === f( %s ) || g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , f( x ) || g( x ) , format("fg( %s ) === f( %s ) || g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "disjunctions" , t => {

test/src/equivalence.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.equivalence( f , g ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , f( x ) === g( x ) , util.format("fg( %s ) === f( %s ) === g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , f( x ) === g( x ) , format("fg( %s ) === f( %s ) === g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "equivalence" , t => {

test/src/implication.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
@@ -15,7 +15,7 @@ var g = function ( x ) {
1515
var fg = predicate.implication( f , g ) ;
1616

1717
var one = function ( t, x ) {
18-
t.deepEqual( fg( x ) , !f( x ) || g( x ) , util.format("fg( %s ) === !f( %s ) || g( %s )" , x , x , x ) ) ;
18+
t.deepEqual( fg( x ) , !f( x ) || g( x ) , format("fg( %s ) === !f( %s ) || g( %s )" , x , x , x ) ) ;
1919
} ;
2020

2121
test( "implication" , t => {

test/src/negation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import test from 'ava';
22
import * as predicate from '../../src';
33

4-
import util from "util" ;
4+
import {format} from "util";
55

66
var f = function ( x ) {
77
return x < 3 ;
88
} ;
99

10-
var F = predicate.negation( f ) ;
10+
var g = predicate.negation( f ) ;
1111

1212
var one = function ( t, x ) {
13-
t.deepEqual( F( x ) , !f( x ) , util.format("F( %s ) === !f( %s )" , x , x ) ) ;
13+
t.deepEqual( g( x ) , !f( x ) , format("g( %s ) === !f( %s )" , x , x ) ) ;
1414
} ;
1515

1616
test( "negation" , t => {

test/src/numbers.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,38 @@ test( "divides" , t => {
55

66
var p = predicate.divides( 12 ) ;
77

8-
t.truthy( !p( 0 ) , "0 does not divide 12" ) ;
9-
t.truthy( p( 1 ) , "1 divides 12" ) ;
10-
t.truthy( p( 2 ) , "2 divides 12" ) ;
11-
t.truthy( p( 3 ) , "3 divides 12" ) ;
12-
t.truthy( p( 4 ) , "4 divides 12" ) ;
13-
t.truthy( !p( 5 ) , "5 does not divide 12" ) ;
14-
t.truthy( p( 6 ) , "6 divides 12" ) ;
15-
t.truthy( !p( 7 ) , "7 does not divide 12" ) ;
16-
t.truthy( !p( 8 ) , "8 does not divide 12" ) ;
17-
t.truthy( !p( 9 ) , "9 does not divide 12" ) ;
18-
t.truthy( !p( 10 ) , "10 does not divide 12" ) ;
19-
t.truthy( !p( 11 ) , "11 does not divide 12" ) ;
20-
t.truthy( p( 12 ) , "12 divides 12" ) ;
21-
t.truthy( !p( 13 ) , "13 does not divide 12" ) ;
8+
t.true( !p( 0 ) , "0 does not divide 12" ) ;
9+
t.true( p( 1 ) , "1 divides 12" ) ;
10+
t.true( p( 2 ) , "2 divides 12" ) ;
11+
t.true( p( 3 ) , "3 divides 12" ) ;
12+
t.true( p( 4 ) , "4 divides 12" ) ;
13+
t.true( !p( 5 ) , "5 does not divide 12" ) ;
14+
t.true( p( 6 ) , "6 divides 12" ) ;
15+
t.true( !p( 7 ) , "7 does not divide 12" ) ;
16+
t.true( !p( 8 ) , "8 does not divide 12" ) ;
17+
t.true( !p( 9 ) , "9 does not divide 12" ) ;
18+
t.true( !p( 10 ) , "10 does not divide 12" ) ;
19+
t.true( !p( 11 ) , "11 does not divide 12" ) ;
20+
t.true( p( 12 ) , "12 divides 12" ) ;
21+
t.true( !p( 13 ) , "13 does not divide 12" ) ;
2222

2323
} ) ;
2424

2525
test( "isdivisible" , t => {
2626

27-
t.truthy( !predicate.divisible( 0 )( 12 ) , "0 does not divide 12" ) ;
28-
t.truthy( predicate.divisible( 1 )( 12 ) , "1 divides 12" ) ;
29-
t.truthy( predicate.divisible( 2 )( 12 ) , "2 divides 12" ) ;
30-
t.truthy( predicate.divisible( 3 )( 12 ) , "3 divides 12" ) ;
31-
t.truthy( predicate.divisible( 4 )( 12 ) , "4 divides 12" ) ;
32-
t.truthy( !predicate.divisible( 5 )( 12 ) , "5 does not divide 12" ) ;
33-
t.truthy( predicate.divisible( 6 )( 12 ) , "6 divides 12" ) ;
34-
t.truthy( !predicate.divisible( 7 )( 12 ) , "7 does not divide 12" ) ;
35-
t.truthy( !predicate.divisible( 8 )( 12 ) , "8 does not divide 12" ) ;
36-
t.truthy( !predicate.divisible( 9 )( 12 ) , "9 does not divide 12" ) ;
37-
t.truthy( !predicate.divisible( 10 )( 12 ) , "10 does not divide 12" ) ;
38-
t.truthy( !predicate.divisible( 11 )( 12 ) , "11 does not divide 12" ) ;
39-
t.truthy( predicate.divisible( 12 )( 12 ) , "12 divides 12" ) ;
40-
t.truthy( !predicate.divisible( 13 )( 12 ) , "13 does not divide 12" ) ;
27+
t.true( !predicate.divisible( 0 )( 12 ) , "0 does not divide 12" ) ;
28+
t.true( predicate.divisible( 1 )( 12 ) , "1 divides 12" ) ;
29+
t.true( predicate.divisible( 2 )( 12 ) , "2 divides 12" ) ;
30+
t.true( predicate.divisible( 3 )( 12 ) , "3 divides 12" ) ;
31+
t.true( predicate.divisible( 4 )( 12 ) , "4 divides 12" ) ;
32+
t.true( !predicate.divisible( 5 )( 12 ) , "5 does not divide 12" ) ;
33+
t.true( predicate.divisible( 6 )( 12 ) , "6 divides 12" ) ;
34+
t.true( !predicate.divisible( 7 )( 12 ) , "7 does not divide 12" ) ;
35+
t.true( !predicate.divisible( 8 )( 12 ) , "8 does not divide 12" ) ;
36+
t.true( !predicate.divisible( 9 )( 12 ) , "9 does not divide 12" ) ;
37+
t.true( !predicate.divisible( 10 )( 12 ) , "10 does not divide 12" ) ;
38+
t.true( !predicate.divisible( 11 )( 12 ) , "11 does not divide 12" ) ;
39+
t.true( predicate.divisible( 12 )( 12 ) , "12 divides 12" ) ;
40+
t.true( !predicate.divisible( 13 )( 12 ) , "13 does not divide 12" ) ;
4141

4242
} ) ;

test/src/operators.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,38 @@ test( "operators" , t => {
55

66
var gt5 = predicate.gt( 5 ) ;
77

8-
t.truthy( !gt5( 4 ) , "4 is not greater than 5" ) ;
9-
t.truthy( !gt5( 5 ) , "5 is not greater than 5" ) ;
10-
t.truthy( gt5( 6 ) , "6 is greater than 5" ) ;
8+
t.true( !gt5( 4 ) , "4 is not greater than 5" ) ;
9+
t.true( !gt5( 5 ) , "5 is not greater than 5" ) ;
10+
t.true( gt5( 6 ) , "6 is greater than 5" ) ;
1111

1212
var ge5 = predicate.ge( 5 ) ;
1313

14-
t.truthy( !ge5( 4 ) , "4 is not greater than or equal to 5" ) ;
15-
t.truthy( ge5( 5 ) , "5 is greater than or equal to 5" ) ;
16-
t.truthy( ge5( 6 ) , "6 is greater than or equal to 5" ) ;
14+
t.true( !ge5( 4 ) , "4 is not greater than or equal to 5" ) ;
15+
t.true( ge5( 5 ) , "5 is greater than or equal to 5" ) ;
16+
t.true( ge5( 6 ) , "6 is greater than or equal to 5" ) ;
1717

1818
var lt5 = predicate.lt( 5 ) ;
1919

20-
t.truthy( lt5( 4 ) , "4 is lower than 5" ) ;
21-
t.truthy( !lt5( 5 ) , "5 is not lower than 5" ) ;
22-
t.truthy( !lt5( 6 ) , "6 is not lower than 5" ) ;
20+
t.true( lt5( 4 ) , "4 is lower than 5" ) ;
21+
t.true( !lt5( 5 ) , "5 is not lower than 5" ) ;
22+
t.true( !lt5( 6 ) , "6 is not lower than 5" ) ;
2323

2424
var le5 = predicate.le( 5 ) ;
2525

26-
t.truthy( le5( 4 ) , "4 is lower than or equal to 5" ) ;
27-
t.truthy( le5( 5 ) , "5 is lower than or equal to 5" ) ;
28-
t.truthy( !le5( 6 ) , "6 is not lower than or equal to 5" ) ;
26+
t.true( le5( 4 ) , "4 is lower than or equal to 5" ) ;
27+
t.true( le5( 5 ) , "5 is lower than or equal to 5" ) ;
28+
t.true( !le5( 6 ) , "6 is not lower than or equal to 5" ) ;
2929

3030
var eq5 = predicate.eq( 5 ) ;
3131

32-
t.truthy( !eq5( 4 ) , "4 is not equal to 5 (eq)" ) ;
33-
t.truthy( eq5( 5 ) , "5 is equal to 5 (eq)" ) ;
34-
t.truthy( !eq5( 6 ) , "6 is not equal to 5 (eq)" ) ;
32+
t.true( !eq5( 4 ) , "4 is not equal to 5 (eq)" ) ;
33+
t.true( eq5( 5 ) , "5 is equal to 5 (eq)" ) ;
34+
t.true( !eq5( 6 ) , "6 is not equal to 5 (eq)" ) ;
3535

3636
var ne5 = predicate.ne( 5 ) ;
3737

38-
t.truthy( ne5( 4 ) , "4 is not equal to 5 (ne)" ) ;
39-
t.truthy( !ne5( 5 ) , "5 is equal to 5 (ne)" ) ;
40-
t.truthy( ne5( 6 ) , "6 is not equal to 5 (ne)" ) ;
38+
t.true( ne5( 4 ) , "4 is not equal to 5 (ne)" ) ;
39+
t.true( !ne5( 5 ) , "5 is equal to 5 (ne)" ) ;
40+
t.true( ne5( 6 ) , "6 is not equal to 5 (ne)" ) ;
4141

4242
} ) ;

0 commit comments

Comments
 (0)