Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update puppeteer and add logs #4938

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 53 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"magic-string": "^0.25.3",
"mocha": "^6.2.0",
"periscopic": "^2.0.1",
"puppeteer": "^1.19.0",
"puppeteer": "^2.1.1",
"rollup": "^1.27.14",
"source-map": "^0.7.3",
"source-map-support": "^0.5.13",
Expand Down
11 changes: 8 additions & 3 deletions test/custom-elements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('custom-elements', function() {
let code;

function create_server() {
return new Promise((fulfil) => {
return new Promise((fulfil, reject) => {
const server = http.createServer((req, res) => {
if (req.url === '/') {
res.end(page);
Expand All @@ -36,6 +36,8 @@ describe('custom-elements', function() {
}
});

server.on('error', reject);

server.listen('6789', () => {
fulfil(server);
});
Expand All @@ -44,13 +46,16 @@ describe('custom-elements', function() {

before(async () => {
svelte = loadSvelte();
console.log('[custom-element] Loaded Svelte');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also consider console.info or console.debug

server = await create_server();
console.log('[custom-element] Started server');
browser = await puppeteer.launch();
console.log('[custom-element] Launched puppeteer browser');
});

after(async () => {
server.close();
await browser.close();
if (server) server.close();
if (browser) await browser.close();
});

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