-
Notifications
You must be signed in to change notification settings - Fork 9k
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
feat(Dev): Allow development under Windows platform #992
Changes from 1 commit
b74fe5d
5b024f2
5413b3f
6cfe2f2
5db8f69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/node_modules/ | ||
/test/output | ||
/test/test-user-data-dir* | ||
/.local-chromium/ | ||
/.dev_profile* | ||
.DS_Store | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ const EMPTY_PAGE = PREFIX + '/empty.html'; | |
const HTTPS_PORT = 8908; | ||
const HTTPS_PREFIX = 'https://localhost:' + HTTPS_PORT; | ||
|
||
const windows = /^win/.test(process.platform); | ||
const headless = (process.env.HEADLESS || 'true').trim().toLowerCase() === 'true'; | ||
const slowMo = parseInt((process.env.SLOW_MO || '0').trim(), 10); | ||
const executablePath = process.env.CHROME; | ||
|
@@ -102,7 +103,8 @@ describe('Puppeteer', function() { | |
await neverResolves; | ||
expect(error.message).toContain('Protocol error'); | ||
})); | ||
it('userDataDir option', SX(async function() { | ||
// Windows has issues running Chromium using a custom user data dir. It hangs when closing the browser. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be the #918 Could you please refer to the issue in the comment so that we keep track of it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
(windows ? xit : it)('userDataDir option', SX(async function() { | ||
const userDataDir = fs.mkdtempSync(path.join(__dirname, 'test-user-data-dir')); | ||
const options = Object.assign({userDataDir}, defaultBrowserOptions); | ||
const browser = await puppeteer.launch(options); | ||
|
@@ -111,7 +113,7 @@ describe('Puppeteer', function() { | |
expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0); | ||
rm(userDataDir); | ||
})); | ||
it('userDataDir argument', SX(async function() { | ||
(windows ? xit : it)('userDataDir argument', SX(async function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's refer to #918 here as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
const userDataDir = fs.mkdtempSync(path.join(__dirname, 'test-user-data-dir')); | ||
const options = Object.assign({}, defaultBrowserOptions); | ||
options.args = [`--user-data-dir=${userDataDir}`].concat(options.args); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, why changing
.bin/jasmine
tojasmine/bin/jasmine.js
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had an exception:
This is where I found the solution https://github.com/gotwarlost/istanbul#usage-on-windows