UNPKG
code-warrior
Version:
latest (0.0.9)
0.0.9
0.0.8
0.0.4
0.0.3
0.0.2
0.0.1
code like a warrior
code-warrior
/
test
/
history
/
heapsort
/
test.js
15 lines
(11 loc)
•
258 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require
(
'should'
);
var
heapsort =
require
(
'./'
);
describe
(
"heapsort"
,
function
(
) {
var
array;
beforeEach
(
function
(
) { array = [
6
,
4
,
2
,
3
,
1
,
5
]; });
it
(
"can sort"
,
function
(
) {
heapsort
(array).
should
.
eql
([
1
,
2
,
3
,
4
,
5
,
6
]); }); });