-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.specs.js
37 lines (29 loc) · 852 Bytes
/
index.specs.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
37
var chai = require('chai'),
expect = chai.expect,
Sort = require('./');
chai.should();
describe("The instanciation (without computation) of the sort object,", function () {
var sort,
array = [3, 1, 6, 2, 5, 4];
beforeEach(function () {
sort = new Sort(array, 0);
});
it("Should not have any result before computation.", function () {
expect(sort.result).to.be.undefined;
});
it("Should not have any step define before computation.", function () {
sort.steps.should.deep.equal([]);
});
});
describe("The instanciation (with computation) of the sort object,", function () {
var sort,
array = [3, 9, 6, 2, 7, 4, 5, 8, 1];
beforeEach(function () {
sort = new Sort(array, 0);
sort.compute();
console.log("Results: ", array, sort.steps);
});
it("Should ...", function () {
expect(sort.result).to.be.undefined;
});
});