diff --git a/src/App.js b/src/App.js
index e3a4350..56a9467 100644
--- a/src/App.js
+++ b/src/App.js
@@ -42,7 +42,7 @@ class App extends React.Component {
newElement = null;
- constructViewBinding(){
+ constructViewBinding() {
return {
changeRootElement: this.changeRootElement,
returnToLastElement: this.returnToLastElement
diff --git a/src/App.test.js b/src/App.test.js
index 60f58e3..d69a1f0 100644
--- a/src/App.test.js
+++ b/src/App.test.js
@@ -100,15 +100,14 @@ describe('', function () {
const wrapper = shallow();
+
+ const func = jest.fn();
+ wrapper.instance().setState = func;
+
expect(global.fetch).toBeCalledTimes(1);
process.nextTick(() => {
- console.log(wrapper.state());
-
- // todo state lifecycle not triggered
- wrapper.update();
- console.log(wrapper.state());
- expect(wrapper.state('passwordsupport')).toBe(true);
+ expect(func).toBeCalledTimes(1);
global.fetch.mockClear();
done();