-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc64aa8
commit f6fbc26
Showing
2 changed files
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { expect, test } from 'vitest' | ||
|
||
test('basic test', () => { | ||
expect(1).toBe(1) | ||
}) |
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,19 @@ | ||
import { join } from 'pathe' | ||
import { expect, test } from 'vitest' | ||
import { runVitestCli } from '../../test-utils' | ||
|
||
const _DRIVE_LETTER_START_RE = /^[A-Z]:\//i | ||
const root = join(import.meta.dirname, '../fixtures/windows-drive-case') | ||
const cwd = root.replace(_DRIVE_LETTER_START_RE, r => r.toLowerCase()) | ||
|
||
test.runIf(process.platform === 'win32')(`works on windows with a lowercase drive: ${cwd}`, async () => { | ||
const { stderr, stdout } = await runVitestCli({ | ||
nodeOptions: { | ||
cwd, | ||
}, | ||
}, '--no-watch') | ||
|
||
expect(cwd[0]).toEqual(cwd[0].toLowerCase()) | ||
expect(stderr).toBe('') | ||
expect(stdout).toContain('1 passed') | ||
}) |