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

Error: No test suite found in tests files #2020

Closed
6 tasks done
GabrielBrandao1618 opened this issue Sep 10, 2022 · 1 comment
Closed
6 tasks done

Error: No test suite found in tests files #2020

GabrielBrandao1618 opened this issue Sep 10, 2022 · 1 comment

Comments

@GabrielBrandao1618
Copy link

Describe the bug

I get this error message when I run "vitest"

Reproduction

package.json

{
  "name": "tdd-training",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "test": "vitest"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^5.36.2",
    "@typescript-eslint/parser": "^5.36.2",
    "eslint": "^8.23.0",
    "typescript": "^4.8.3",
    "vitest": "^0.23.2"
  }
}

vite.config.ts

import {defineConfig} from 'vitest/config'

export default defineConfig({
    test:{}
})

sum.test.ts

import {test, expect} from 'vitest';

test('Testing sum', ()=> {
    expect(2+2).toBe(4)
});

Then I run npm test
Result:
image

Also, I am using npm but this happens the same exact way when I use yarn too

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (2) x64 Intel(R) Celeron(R) CPU N3350 @ 1.10GHz
    Memory: 665.01 MB / 3.87 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.19.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.27)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

npm

Validations

@GabrielBrandao1618
Copy link
Author

Apparently this was happening because i was running on Windows
A tried on WSL and it worked✔

@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant