Skip to content

Commit

Permalink
fix: change some code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
oxala committed Sep 26, 2018
1 parent ab2d0ee commit 10d8324
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const runFixtures = (fixtures, fullPath, withAwait) => (fixtureName) => {
.filter(([name]) => (!fixtureName || fixtureName === name))
.forEach(([name, fixture]) => it(`should render component with ${name} fixture`, async () => {
const comp = await render(fullPath, withAwait)(clone(fixture));

expect(Array.from(document.body.childNodes)).toMatchSnapshot();
comp.destroy();
}));
Expand All @@ -76,10 +77,7 @@ const runFixtures = (fixtures, fullPath, withAwait) => (fixtureName) => {
const helpers = {
createEvent: eventName => (customEvent => (customEvent.initEvent(eventName, true, true) || customEvent))(document.createEvent('Event')),
defer: () => (toReturn => Object.assign(toReturn, {
promise: new Promise((resolve, reject) => Object.assign(toReturn, {
resolve,
reject,
})),
promise: new Promise((resolve, reject) => Object.assign(toReturn, { resolve, reject })),
}))({}),
};
const tester = (componentPath, { withoutFixtures, withAwait } = {}) => {
Expand Down

0 comments on commit 10d8324

Please sign in to comment.