-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.js
36 lines (21 loc) · 680 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var assert = require('assert');
var c = require('./common')(true, 42);
var initialState = c.initialState;
var playPiece = c.playPiece;
var renderState = c.renderState;
var st = initialState();
console.log( renderState(st) );
playPiece(0, [0, 0], st);
console.log( renderState(st) );
playPiece(1, [5, 0], st);
console.log( renderState(st) );
playPiece(2, [0, 5], st);
console.log( renderState(st) );
describe('Array', function() {
describe('#indexOf()', function() {
it('should return -1 when the value is not present', function(){
assert.equal(-1, [1,2,3].indexOf(5));
assert.equal(-1, [1,2,3].indexOf(0));
})
})
});