Skip to content

Commit

Permalink
replace exist with truthy
Browse files Browse the repository at this point in the history
  • Loading branch information
mertkahyaoglu committed May 2, 2017
1 parent 6ee53b3 commit 72bcaf4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/containers/tests/metafields.spec.js
Expand Up @@ -40,8 +40,8 @@ describe('Containers::MetaFields', () => {
let { component, metafields, addFieldButton, addDataFieldButton } = setup();

expect(component.find('div').first().hasClass('metafields')).toEqual(true);
expect(addFieldButton.node).toExist();
expect(addDataFieldButton.node).toNotExist();
expect(addFieldButton.node).toBeTruthy();
expect(addDataFieldButton.node).not.toBeTruthy();

const updatedSetup = setup(Object.assign({}, defaultProps, {
dataview: true
Expand All @@ -50,8 +50,8 @@ describe('Containers::MetaFields', () => {
expect(
updatedSetup.component.find('div').first().hasClass('datafields')
).toEqual(true);
expect(updatedSetup.addFieldButton.node).toNotExist();
expect(updatedSetup.addDataFieldButton.node).toExist();
expect(updatedSetup.addFieldButton.node).not.toBeTruthy();
expect(updatedSetup.addDataFieldButton.node).toBeTruthy();

expect(component.prop('key_prefix')).toBe('');
expect(component.prop('metadata')).toEqual(content);
Expand Down

0 comments on commit 72bcaf4

Please sign in to comment.