Merge pull request #187 from dotnet-maestro-bot/merge/release/2.2-to-master

[automated] Merge branch 'release/2.2' => 'master'
This commit is contained in:
Pranav K 2018-10-16 10:41:18 -07:00 committed by GitHub
commit f074714eb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 5 deletions

View File

@ -1,4 +1,10 @@
{ {
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
"channel": "master" "channel": "master",
"toolsets": {
"nodejs": {
"required": true,
"minVersion": "8.0"
}
}
} }

View File

@ -11,7 +11,7 @@ namespace FunctionalTests
{ {
internal static class ProcessManager internal static class ProcessManager
{ {
private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(60); private static readonly TimeSpan Timeout = TimeSpan.FromMinutes(3);
public static Task<ProcessResult> RunProcessAsync(ProcessStartInfo processStartInfo) public static Task<ProcessResult> RunProcessAsync(ProcessStartInfo processStartInfo)
{ {

View File

@ -10,19 +10,37 @@ const debug = process.env.npm_config_debug || false;
jest.setTimeout(debug ? 60000 : 30000); jest.setTimeout(debug ? 60000 : 30000);
let browser; let browser;
let error;
beforeAll(async () => { beforeAll(async () => {
const options = debug ? const options = debug ?
{ headless: false, slowMo: 100 } : { headless: false, slowMo: 100 } :
{ args: ['--no-sandbox'] }; { args: ['--no-sandbox'] };
browser = await puppeteer.launch(options);
expect(browser).toBeDefined(); try {
browser = await puppeteer.launch(options);
} catch (ex) {
error = ex;
}
}); });
afterAll(async () => { afterAll(async () => {
await browser.close(); if (browser) {
await browser.close();
}
}); });
describe('Browser is initialized', () => {
// Workaround for https://github.com/jasmine/jasmine/issues/1533.
// Jasmine will not report errors from beforeAll and instead fail all the tests that
// expect the browser to be available. This test allows us to ensure the setup was successful
// and if unsuccessful report the error
test('no errors on launch', () => {
expect(error).toBeUndefined();
expect(browser).toBeDefined();
})
})
describe('CORS allowed origin tests ', () => { describe('CORS allowed origin tests ', () => {
const testPagePath = `http://${hostname}:9001/`; const testPagePath = `http://${hostname}:9001/`;
let page; let page;