Skip to content

Commit 8067158

Browse files
authored
ci: run test suite on windows (#165)
1 parent b801fe5 commit 8067158

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010

1111
jobs:
1212
ci:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
runs-on: ${{ matrix.os }}
1417
steps:
1518
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
1619
- run: corepack enable

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
shamefully-hoist=true
2+
shell-emulator=true
3+

test/e2e.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createServer } from 'node:http'
22
import { fileURLToPath } from 'node:url'
3+
import os from 'node:os'
34

45
import { getRandomPort } from 'get-port-please'
56
import { createApp, readBody, toNodeListener, defineEventHandler } from 'h3'
@@ -15,7 +16,7 @@ const app = createApp().use(defineEventHandler(async (event) => {
1516
delete body.context.nodeVersion
1617
expect(body.context.nuxtVersion).toBeDefined()
1718
delete body.context.nuxtVersion
18-
expect(body.context.os).toEqual(process.platform)
19+
expect(body.context.os).toEqual(os.type().toLocaleLowerCase())
1920
delete body.context.os
2021
expect(body.context.projectHash).toBeDefined()
2122
expect(body.context.projectSession).toBeDefined()

0 commit comments

Comments
 (0)