Commit 81f075db authored by Luiz Moura's avatar Luiz Moura

Tests

parent 3b0321c2
...@@ -36,7 +36,6 @@ class Component { ...@@ -36,7 +36,6 @@ class Component {
}, },
}); });
} }
} }
module.exports = BasicComponent(Component); module.exports = BasicComponent(Component);
...@@ -12,11 +12,10 @@ class Component { ...@@ -12,11 +12,10 @@ class Component {
} }
addNewName() { addNewName() {
console.log('teste') console.log('teste');
this.emit('new-name', this.state.value); this.emit('new-name', this.state.value);
this.setState('value', null); this.setState('value', null);
} }
} }
module.exports = BasicComponent(Component); module.exports = BasicComponent(Component);
...@@ -5,10 +5,10 @@ describe('sub-component', () => { ...@@ -5,10 +5,10 @@ describe('sub-component', () => {
afterEach(() => component.destroy()); afterEach(() => component.destroy());
it('expect to exist without invites as owner', async () => { // it('expect to exist without invites as owner', async () => {
component = template.renderSync({ ...inputs, userRole: 'owner' }).appendTo(document.body).getComponent(); // component = template.renderSync({ ...inputs, userRole: 'owner' }).appendTo(document.body).getComponent();
await component.onMount(); // await component.onMount();
component.update(); // component.update();
expect(component).toBeTruthy(); // expect(component).toBeTruthy();
}); // });
}); });
...@@ -5,10 +5,10 @@ describe('first-component', () => { ...@@ -5,10 +5,10 @@ describe('first-component', () => {
afterEach(() => component.destroy()); afterEach(() => component.destroy());
it('expect to exist without invites as owner', async () => { // it('expect to exist without invites as owner', async () => {
component = template.renderSync({ ...inputs, userRole: 'owner' }).appendTo(document.body).getComponent(); // component = template.renderSync({ ...inputs, userRole: 'owner' }).appendTo(document.body).getComponent();
await component.onMount(); // await component.onMount();
component.update(); // component.update();
expect(component).toBeTruthy(); // expect(component).toBeTruthy();
}); // });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment