From b73034f3b205666ad58f4de3495c06f57c387d4f Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Mon, 16 Mar 2020 20:45:56 +0800 Subject: [PATCH] figure out why test failed --- test/custom-elements/index.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index bbee66b4fd71..d138f562bf81 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -43,14 +43,24 @@ describe('custom-elements', function() { } before(async () => { - svelte = loadSvelte(); - server = await create_server(); - browser = await puppeteer.launch(); + try { + svelte = loadSvelte(); + server = await create_server(); + browser = await puppeteer.launch(); + console.log('Success!'); + } catch (error) { + console.log('Error', error); + } }); after(async () => { - server.close(); - await browser.close(); + try { + server.close(); + await browser.close(); + console.log('Success!'); + } catch (error) { + console.log('Error', error); + } }); fs.readdirSync(`${__dirname}/samples`).forEach(dir => {