Skip to content

Commit e923102

Browse files
🔍 test: Make tests run.
1 parent 0a26359 commit e923102

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

test/src/DoublyLinkedList.js

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

4-
test( "DoublyLinkedList" , function ( assert ) {
4+
test( "DoublyLinkedList" , t => {
55

6-
var list = new dll.DoublyLinkedList( ) ;
6+
const list = new dll.DoublyLinkedList( ) ;
77

8-
var a = list.push( 1 ) ;
9-
var b = list.push( 2 ) ;
10-
var c = list.push( 3 ) ;
11-
var d = list.push( 4 ) ;
8+
const a = list.push( 1 ) ;
9+
const b = list.push( 2 ) ;
10+
const c = list.push( 3 ) ;
11+
const d = list.push( 4 ) ;
1212

13-
assert.equal( list.length , 4 ) ;
13+
t.deepEqual( list.length , 4 ) ;
1414

15-
assert.t.deepEqual( list.erase( b ) , c ) ;
15+
t.deepEqual( list.erase( b ) , c ) ;
1616

17-
assert.equal( list.length , 3 ) ;
17+
t.deepEqual( list.length , 3 ) ;
1818

19-
assert.t.deepEqual( list.rerase( c ) , a ) ;
19+
t.deepEqual( list.rerase( c ) , a ) ;
2020

21-
assert.equal( list.length , 2 ) ;
21+
t.deepEqual( list.length , 2 ) ;
2222

23-
assert.t.deepEqual( list.erase( a ) , d ) ;
23+
t.deepEqual( list.erase( a ) , d ) ;
2424

25-
assert.equal( list.length , 1 ) ;
25+
t.deepEqual( list.length , 1 ) ;
2626

27-
assert.t.deepEqual( list.erase( d ) , list.end( ) ) ;
27+
t.deepEqual( list.erase( d ) , list.end( ) ) ;
2828

29-
assert.equal( list.length , 0 ) ;
29+
t.deepEqual( list.length , 0 ) ;
3030

3131
} ) ;

test/src/list-spec.js

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

4-
import spec from "@aureooms/js-list-spec" ;
5-
spec.test( "DoublyLinkedList" , dll.DoublyLinkedList ) ;
6-
4+
import * as spec from "@aureooms/js-list-spec" ;
5+
spec.test( test , "DoublyLinkedList" , dll.DoublyLinkedList ) ;

0 commit comments

Comments
 (0)