chore: create common directory (#6042)

These files will be used by both the web and node versions of Puppeteer.
Another name for this might be "core" but I don't want to cause
confusion with the puppeteer-core package that we publish at the moment.
This commit is contained in:
Jack Franklin
2020-06-18 15:53:23 +01:00
committed by GitHub
parent f6af7b8df0
commit 9522f80116
50 changed files with 102 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
const { EventEmitter } = require('../lib/EventEmitter');
const { EventEmitter } = require('../lib/common/EventEmitter');
const sinon = require('sinon');
const expect = require('expect');

View File

@@ -104,7 +104,7 @@ const trackCoverage = () => {
before(() => {
const api = require('../lib/api');
const events = require('../lib/Events');
const events = require('../lib/common/Events');
for (const [className, classType] of Object.entries(api))
traceAPICoverage(coverageMap, events, className, classType);
});

View File

@@ -17,7 +17,7 @@ const fs = require('fs');
const os = require('os');
const path = require('path');
const sinon = require('sinon');
const { helper } = require('../lib/helper');
const { helper } = require('../lib/common/helper');
const rmAsync = helper.promisify(require('rimraf'));
const mkdtempAsync = helper.promisify(fs.mkdtemp);
const readFileAsync = helper.promisify(fs.readFile);