This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove is-windows dependency (#207)
- Loading branch information
bibo5088
authored and
Kent C. Dodds
committed
Aug 31, 2019
1 parent
4889923
commit a75fd0e
Showing
11 changed files
with
52 additions
and
10 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
File renamed without changes.
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,25 @@ | ||
import isWindows from "../is-windows" | ||
|
||
it(`should return true if the current OS is Windows`, () => { | ||
process.platform = 'win32' | ||
expect(isWindows()).toBe(true) | ||
|
||
}) | ||
|
||
it(`should return false if the current OS is not Windows`, () => { | ||
process.platform = 'linux' | ||
expect(isWindows()).toBe(false) | ||
}) | ||
|
||
it(`should return true if the OSTYPE is cygwin or msys`, () => { | ||
process.platform = 'linux' | ||
|
||
process.env.OSTYPE = 'cygwin' | ||
expect(isWindows()).toBe(true) | ||
|
||
process.env.OSTYPE = 'msys' | ||
expect(isWindows()).toBe(true) | ||
|
||
process.env.OSTYPE = '' | ||
expect(isWindows()).toBe(false) | ||
}) |
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 @@ | ||
export default () => process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE) |
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