-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa374bd
commit 4f694ff
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<script src="https://ru.js.cx/test/libs.js"></script> | ||
<script src="test.js"></script> | ||
<script> | ||
|
||
function Accumulator(stringValue) { | ||
this.value = Number(stringValue), | ||
|
||
this.read = function(stringValue) { | ||
this.value += Number(stringValue); | ||
} | ||
}; | ||
|
||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
describe("Calculator", function() { | ||
|
||
context("Simple tests", function() { | ||
it("Begin from 4 and add 2 = 6", function() { | ||
let acc = new Accumulator("4") | ||
acc.read("2") | ||
assert.equal(acc.value, 6); | ||
}); | ||
}); | ||
}); |