Skip to content

Commit

Permalink
figure out why test failed
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Mar 16, 2020
1 parent 571011b commit 50630bb
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions test/custom-elements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,29 @@ describe('custom-elements', function() {
});
}

before(async () => {
svelte = loadSvelte();
server = await create_server();
browser = await puppeteer.launch();
before(async (done) => {
try {
svelte = loadSvelte();
server = await create_server();
browser = await puppeteer.launch();
console.log('Success!');
done();
} catch (error) {
console.log('Error', error);
done();
}
});

after(async () => {
server.close();
await browser.close();
after(async (done) => {
try {
server.close();
await browser.close();
console.log('Success!');
done();
} catch (error) {
console.log('Error', error);
done();
}
});

fs.readdirSync(`${__dirname}/samples`).forEach(dir => {
Expand Down

0 comments on commit 50630bb

Please sign in to comment.