Skip to content

Commit 1acf9d9

Browse files
committed
chore: remove windows from CI coverage
1 parent bf17498 commit 1acf9d9

File tree

5 files changed

+13
-21
lines changed

5 files changed

+13
-21
lines changed

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: ${{ !contains(github.head_ref, 'all-contributors') }}
1717
strategy:
1818
matrix:
19-
os: [ubuntu-latest, windows-latest]
19+
os: [ubuntu-latest]
2020
node: [12, 14, 16]
2121
runs-on: ${{ matrix.os }}
2222
steps:

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ Usage example:
6666

6767
```javascript
6868
const {resolve} = require('path')
69-
const {render, fireEvent} = require('cli-testing-library')
69+
const {render} = require('cli-testing-library')
7070

7171
test('Is able to make terminal input and view in-progress stdout', async () => {
72-
const {cleanup, findByText} = await render('node', [
72+
const {cleanup, findByText, userEvent} = await render('node', [
7373
resolve(__dirname, './execute-scripts/stdio-inquirer.js'),
7474
])
7575

@@ -81,17 +81,23 @@ test('Is able to make terminal input and view in-progress stdout', async () => {
8181

8282
cleanup()
8383

84-
fireEvent.down(instance)
84+
userEvent("[ArrowDown]")
8585

8686
expect(await findByText('❯ Two')).toBeTruthy()
8787

8888
cleanup()
8989

90-
fireEvent.enter(instance)
90+
userEvent.keyboard("[Enter]")
9191

9292
expect(await findByText('First option: Two')).toBeTruthy()
9393
})
9494
```
95+
96+
> While this library _does_ work in Windows, it does not appear to function properly in Windows CI environments, such
97+
> as GitHub actions. As a result, you may need to either switch CI systems or limit your CI to only run in Linux
98+
>
99+
> If you know how to fix this, please let us know in [this tracking issue](https://github.com/crutchcorn/cli-testing-library/issues/3)
100+
95101
## Contributors ✨
96102

97103
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -110,4 +116,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
110116

111117
<!-- ALL-CONTRIBUTORS-LIST:END -->
112118

113-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
119+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"@types/lz-string": "^1.3.34",
5151
"@types/strip-final-newline": "^3.0.0",
5252
"inquirer": "^8.2.0",
53-
"is-ci": "^3.0.1",
5453
"jest-in-case": "^1.0.2",
5554
"jest-snapshot-serializer-ansi": "^1.0.0",
5655
"jest-watch-select-projects": "^2.0.0",

src/__tests__/events.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,11 @@ const {render, cleanup} = require('../pure')
33
const {fireEvent} = require('../events')
44
const {waitFor} = require('../wait-for')
55
const {default: userEvent} = require('../user-event')
6-
const {getConfig, configure} = require("../config");
76

87
afterEach(async () => {
98
await cleanup()
109
})
1110

12-
let originalConfig
13-
beforeAll(() => {
14-
originalConfig = getConfig()
15-
configure({asyncUtilTimeout: 7000, errorDebounceTimeout: 500})
16-
})
17-
18-
afterAll(() => {
19-
configure(originalConfig)
20-
})
21-
2211
test('fireEvent write works', async () => {
2312
const props = await render('node', [
2413
resolve(__dirname, './execute-scripts/stdio-inquirer.js'),

tests/setup-env.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import jestSnapshotSerializerAnsi from 'jest-snapshot-serializer-ansi'
2-
import isCI from "is-ci";
32

43
expect.addSnapshotSerializer(jestSnapshotSerializerAnsi)
54
// add serializer for MutationRecord
@@ -46,6 +45,5 @@ afterAll(() => {
4645
jest.restoreAllMocks()
4746
})
4847

49-
const isWindowsCI = isCI && process.platform === "win32";
5048

51-
jest.setTimeout(isWindowsCI ? 15000 : 7000)
49+
jest.setTimeout(7000)

0 commit comments

Comments
 (0)