Skip to content

Commit

Permalink
test: actually run runntet.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Mar 3, 2024
1 parent b5ca1a8 commit 85aa7ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ describe('TestRunner', () => {
]
testCases.forEach(function (testCase) {
const {isWindows, useCustomStartProcess, expectedArgs} = testCase
describe(
it(
'scheduleRun wrap test patterns if needed, (isWindows: ' + isWindows + ', customStartProcess: ' + useCustomStartProcess + ')',
async () => {
Object.defineProperty(platformConstants, 'isWindows', { value: isWindows, writable: true })
const workspacePath = '/test'
const testFiles = ['abc.spec.ts']
const testNamePattern = 'a (b) "c" d'
const customStartProcess = useCustomStartProcess ? () => {} : undefined

const { testResultFiles, output } = await new TestRunner(workspacePath, undefined).scheduleRun(
testFiles,
testNamePattern,
Expand All @@ -36,7 +36,7 @@ describe('TestRunner', () => {
undefined,
customStartProcess,
)

expect(testResultFiles).to.not.equal(undefined)
expect(output).to.equal(`vitest.cmd=npx vitest.args=${expectedArgs} workspace=/test customStartProcess=${useCustomStartProcess}`)
})
Expand Down

0 comments on commit 85aa7ed

Please sign in to comment.