Skip to content

Commit

Permalink
Fix test code
Browse files Browse the repository at this point in the history
  • Loading branch information
ragingwind committed May 27, 2019
1 parent 2db3780 commit 5bf76ef
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ test(
icons[i].src === `/static/manifest/icons/icon-${size}x${size}.png`
);

try {
const icons = await fn(opts);
const icons = await fn(opts);

expect(exist()).toBe(true);
expect(match(opts.sizes, icons)).toBe(true);
} catch (e) {
console.log('Error', e);
}
expect(exist()).toBe(true);
expect(match(opts.sizes, icons)).toBe(true);
},
1000 * 50
);
Expand All @@ -61,10 +57,9 @@ test(
const icon = size => join(opts.output, `icon-${size}x${size}.png`);
const exist = () => opts.sizes.every(size => fs.existsSync(icon(size)));

console.log('start1')
fn.sync(opts);
fn.sync(opts);

expect(exist()).toBe(true);
expect(exist()).toBe(true);
},
1000 * 50
);

0 comments on commit 5bf76ef

Please sign in to comment.