Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking: Replace
chrome
connector with puppeteer
Fix #2255
- Loading branch information
Showing
6 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,45 @@ | ||
import * as isCI from 'is-ci'; | ||
|
||
/* | ||
* This interface needs to be imported in order | ||
* to generate the definition of this file. | ||
*/ | ||
import { IConnectorConstructor } from 'hint'; | ||
|
||
import ChromeConnector from '@hint/connector-chrome'; | ||
import PuppeteerConnector from '@hint/connector-puppeteer'; | ||
import JSDOMConnector from '@hint/connector-jsdom'; | ||
|
||
/** The IDs of the available connectors to test. */ | ||
export const ids = [ | ||
'chrome', | ||
const ids = [ | ||
'jsdom' | ||
]; | ||
|
||
/** The Constructors of the available connectors to test. */ | ||
export const connectors: { ctor: IConnectorConstructor; name: string }[] = [ | ||
{ | ||
ctor: ChromeConnector, | ||
name: 'chrome' | ||
}, | ||
const connectors: { ctor: IConnectorConstructor; name: string }[] = [ | ||
{ | ||
ctor: JSDOMConnector, | ||
name: 'jsdom' | ||
} | ||
]; | ||
|
||
/** | ||
* Azure Pipelines has an old version of Chrome that does not | ||
* work with puppeteer correctly. This is needed to ignore | ||
* the connector until they update. | ||
*/ | ||
if (!(isCI && process.platform === 'win32')) { | ||
/** | ||
* Need to `unshift` instead of `push` because otherwise some | ||
* tests with `jsdom` could time out (i.e.: `no-disallowed-headers`) | ||
*/ | ||
ids.unshift('puppeteer'); | ||
connectors.unshift({ | ||
ctor: PuppeteerConnector, | ||
name: 'puppeteer' | ||
}); | ||
} | ||
|
||
export { | ||
connectors, | ||
ids | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters