We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa374bd commit 4f694ffCopy full SHA for 4f694ff
exercises/chapter_04.5_task_2/index.html
@@ -0,0 +1,16 @@
1
+<!doctype html>
2
+<script src="https://ru.js.cx/test/libs.js"></script>
3
+<script src="test.js"></script>
4
+<script>
5
+
6
+ function Accumulator(stringValue) {
7
+ this.value = Number(stringValue),
8
9
+ this.read = function(stringValue) {
10
+ this.value += Number(stringValue);
11
+ }
12
+ };
13
14
+</script>
15
16
+</html>
exercises/chapter_04.5_task_2/test.js
@@ -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);
+ });
+});
0 commit comments