-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add browsers option to test command (#27)
* feat: add browsers option to test command
- Loading branch information
1 parent
7df76c1
commit 64a1d46
Showing
8 changed files
with
82 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const osType = require('os').type(); | ||
|
||
const isWin = osType === 'Windows_NT'; | ||
const isDarwin = osType === 'Darwin'; /* macOS, iOS, iPadOS */ | ||
|
||
const defaultBrowsers = ['chrome', 'firefox']; | ||
const availableBrowsers = ['chrome', 'firefox', 'opera']; | ||
|
||
// do not perform browser check as it is slow and never required | ||
|
||
if (isWin) { | ||
availableBrowsers.push('ie'); | ||
} | ||
|
||
if (isDarwin) { | ||
// defaultBrowsers.push('safari'); /* there is a bug https://github.com/karma-runner/karma-safari-launcher/issues/29, so do not include it by default */ | ||
availableBrowsers.push('safari'); | ||
} | ||
|
||
module.exports = { | ||
defaultBrowsers, | ||
availableBrowsers | ||
}; |
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { defaultBrowsers, availableBrowsers } = require('../../browserList'); | ||
|
||
module.exports = { defaultBrowsers, availableBrowsers }; |
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,7 +1,5 @@ | ||
import { | ||
ControlElement, | ||
css, | ||
CSSResult, | ||
customElement, | ||
html, | ||
property, | ||
|