Switch from the Chrome runner to JSDom (#8800)
(cherry picked from commit 4313463a94)
This commit is contained in:
@@ -125,7 +125,23 @@
|
||||
$error.Clear()
|
||||
|
||||
Write-Output "### gulp build for version $($this.Version.Release)" >> $log 2>&1
|
||||
npx gulp build --buildversion=$this.Version.Release >> $log 2>&1
|
||||
npm run build --buildversion=$this.Version.Release >> $log 2>&1
|
||||
|
||||
# We can ignore this warning, we need to update to node 12 at some point - https://github.com/jsdom/jsdom/issues/2939
|
||||
$indexes = [System.Collections.ArrayList]::new()
|
||||
$index = 0;
|
||||
$error | ForEach-Object {
|
||||
# Find which of the errors is the ExperimentalWarning
|
||||
if($_.ToString().Contains("ExperimentalWarning: The fs.promises API is experimental")) {
|
||||
[void]$indexes.Add($index)
|
||||
}
|
||||
$index++
|
||||
}
|
||||
$indexes | ForEach-Object {
|
||||
# Loop through the list of indexes and remove the errors that we expect and feel confident we can ignore
|
||||
$error.Remove($error[$_])
|
||||
}
|
||||
|
||||
if (-not $?) { throw "Failed to build" } # that one is expected to work
|
||||
} finally {
|
||||
Pop-Location
|
||||
|
||||
@@ -71,11 +71,11 @@
|
||||
"gulp-wrap": "0.15.0",
|
||||
"gulp-wrap-js": "0.4.1",
|
||||
"jasmine-core": "3.5.0",
|
||||
"jsdom": "16.4.0",
|
||||
"karma": "4.4.1",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-jsdom-launcher": "^8.0.2",
|
||||
"karma-jasmine": "2.0.1",
|
||||
"karma-junit-reporter": "2.0.1",
|
||||
"karma-phantomjs-launcher": "1.0.4",
|
||||
"karma-spec-reporter": "0.0.32",
|
||||
"less": "3.10.3",
|
||||
"lodash": "4.17.19",
|
||||
|
||||
@@ -100,14 +100,7 @@ module.exports = function (config) {
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
// CLI --browsers Chrome,Firefox,Safari
|
||||
browsers: ['ChromeHeadless'],
|
||||
|
||||
customLaunchers: {
|
||||
ChromeDebugging: {
|
||||
base: 'Chrome',
|
||||
flags: ['--remote-debugging-port=9333']
|
||||
}
|
||||
},
|
||||
browsers: ['jsdom'],
|
||||
|
||||
// allow waiting a bit longer, some machines require this
|
||||
|
||||
@@ -123,11 +116,9 @@ module.exports = function (config) {
|
||||
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-phantomjs-launcher'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jsdom-launcher'),
|
||||
require('karma-junit-reporter'),
|
||||
require('karma-spec-reporter')
|
||||
|
||||
],
|
||||
|
||||
// the default configuration
|
||||
|
||||
Reference in New Issue
Block a user