Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test:ci): reporters utils test is failing #1308

Merged
merged 1 commit into from May 14, 2022

Conversation

userquin
Copy link
Member

wrong DefaultReporter import path:

test/single-thread test$ vitest "--allowOnly"
test/reporters test: (node:11992) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
test/reporters test: (Use `node --trace-deprecation ...` to show where the warning was created)
test/reporters test:  ❯ tests/utils.test.ts  (0 test)
test/reporters test:  √ tests/reporters.spec.ts  (14 tests) 71ms
test/reporters test: ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
test/reporters test:  FAIL  tests/utils.test.ts [ tests/utils.test.ts ]
test/reporters test: Error: [vite-node] Failed to load ../../../../vitest/packages/vitest/src/node/reporters/default
test/reporters test:  ❯ async tests/utils.test.ts:7:31
test/reporters test:       5| import type { ViteNodeRunner } from 'vite-node/client'
test/reporters test:       6| import { describe, expect, test } from 'vitest'
test/reporters test:       7| import { createReporters } from 'vitest/src/node/reporters/utils'
test/reporters test:        |                               ^
test/reporters test:       8| import { DefaultReporter } from '../../../../vitest/packages/vitest/sr…
test/reporters test:       9| import TestReporter from '../src/custom-reporter'
test/reporters test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
test/reporters test: Test Files  1 failed | 1 passed | 1 skipped (3)
test/reporters test:      Tests  14 passed | 1 skipped (15)
test/reporters test:       Time  2.33s (in thread 71ms, 3285.89%)
test/reporters test: Failed
undefined
F:\work\projects\quini\GitHub\antfu\vitest-pnpm7\test\reporters:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @vitest/test-reporters@ test: `vitest "--allowOnly"`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

wrong `DefaultReporter` import path:

```shell
test/single-thread test$ vitest "--allowOnly"
test/reporters test: (node:11992) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
test/reporters test: (Use `node --trace-deprecation ...` to show where the warning was created)
test/reporters test:  ❯ tests/utils.test.ts  (0 test)
test/reporters test:  √ tests/reporters.spec.ts  (14 tests) 71ms
test/reporters test: ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
test/reporters test:  FAIL  tests/utils.test.ts [ tests/utils.test.ts ]
test/reporters test: Error: [vite-node] Failed to load ../../../../vitest/packages/vitest/src/node/reporters/default
test/reporters test:  ❯ async tests/utils.test.ts:7:31
test/reporters test:       5| import type { ViteNodeRunner } from 'vite-node/client'
test/reporters test:       6| import { describe, expect, test } from 'vitest'
test/reporters test:       7| import { createReporters } from 'vitest/src/node/reporters/utils'
test/reporters test:        |                               ^
test/reporters test:       8| import { DefaultReporter } from '../../../../vitest/packages/vitest/sr…
test/reporters test:       9| import TestReporter from '../src/custom-reporter'
test/reporters test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
test/reporters test: Test Files  1 failed | 1 passed | 1 skipped (3)
test/reporters test:      Tests  14 passed | 1 skipped (15)
test/reporters test:       Time  2.33s (in thread 71ms, 3285.89%)
test/reporters test: Failed
undefined
F:\work\projects\quini\GitHub\antfu\vitest-pnpm7\test\reporters:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @vitest/test-reporters@ test: `vitest "--allowOnly"`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.
```
@netlify
Copy link

netlify bot commented May 14, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 555305a
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/627fa850d7d98b000993ccef
😎 Deploy Preview https://deploy-preview-1308--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antfu antfu merged commit 775a26d into main May 14, 2022
@antfu antfu deleted the userquin/fix-reporters-test branch May 14, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants