forked from javascript-tutorial/ro.javascript.info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
41 lines (25 loc) · 730 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
37
38
39
40
41
describe("counter", function() {
it("crește de la un apel la altul", function() {
let counter = makeCounter();
assert.equal( counter(), 0 );
assert.equal( counter(), 1 );
assert.equal( counter(), 2 );
});
describe("counter.set", function() {
it("setează count", function() {
let counter = makeCounter();
counter.set(10);
assert.equal( counter(), 10 );
assert.equal( counter(), 11 );
});
});
describe("counter.decrease", function() {
it("scade count", function() {
let counter = makeCounter();
counter.set(10);
assert.equal( counter(), 10 );
counter.decrease();
assert.equal( counter(), 10 );
});
});
});