Skip to content

Commit f9ba7aa

Browse files
committed
remove init function from counter-reset.js & counter-reset.test.js fixes #49 https://youtu.be/OawqekA7bgk
1 parent 075c4c4 commit f9ba7aa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: examples/counter-reset/counter.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ function div(divid, text) {
6666
return div;
6767
}
6868

69-
function init(doc){
70-
document = doc; // this is used for instantiating JSDOM. ignore!
71-
}
72-
7369
/* The code block below ONLY Applies to tests run using Node.js */
74-
/* istanbul ignore next */
70+
/* istanbul ignore else */
7571
if (typeof module !== 'undefined' && module.exports) {
7672
module.exports = {
7773
view: view,
@@ -80,6 +76,5 @@ if (typeof module !== 'undefined' && module.exports) {
8076
div: div,
8177
button: button,
8278
empty: empty,
83-
init: init
8479
}
85-
} else { init(document); }
80+
}

Diff for: test/counter-reset.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require('jsdom-global')(html);
77
const counter = require(path.resolve(__dirname,
88
'../examples/counter-reset/counter.js'));
99
const { view, mount, update, div, button, empty, init} = counter;
10-
init(document); // pass the JSDOM into counter.js
1110
const id = 'test-app';
1211

1312
test('Mount app expect state to be Zero', function (t) {

0 commit comments

Comments
 (0)