Giter Site home page Giter Site logo

Not working on macOS about vscode HOT 12 CLOSED

vitest-dev avatar vitest-dev commented on July 30, 2024 5
Not working on macOS

from vscode.

Comments (12)

searene avatar searene commented on July 30, 2024 4

@zxch3n Hi,

After I started the 1 + 1 = 2 test by clicking here using the pre-release version

image

I got the following output:

[INFO 8:53:41 PM] Vitest Workspace [vitest-ext-basic-example]: Vitest version = 0.12.10
[INFO 8:55:01 PM] Tests run start
[INFO 8:55:01 PM] [Workspace "vitest-ext-basic-example] Run tests from workspace
[INFO 8:55:01 PM] [Execute Vitest] ./node_modules/.bin/vitest /Users/joey/WebstormProjects/vitest-ext-basic-example/add.test.ts -t add 1 + 1
[INFO 8:55:01 PM] Start api process at port 65185
[INFO 8:55:01 PM] [RUN] ./node_modules/.bin/vitest /Users/joey/WebstormProjects/vitest-ext-basic-example/add.test.ts -t add 1 + 1
[INFO 8:55:01 PM] [RUN.cwd] /Users/joey/WebstormProjects/vitest-ext-basic-example
[INFO 8:55:01 PM] WS Close
[INFO 8:55:01 PM] WS Close
[INFO 8:55:01 PM] WS Close
[INFO 8:55:02 PM] WS Close
[INFO 8:55:02 PM] WS Close
[INFO 8:55:02 PM] WS Opened
[INFO 8:55:02 PM] WS Opened
[INFO 8:55:02 PM] 

 DEV  v0.12.10 /Users/joey/WebstormProjects/vitest-ext-basic-example

      API started at http://localhost:65185



[INFO 8:55:03 PM] Vitest api process finished
[INFO 8:55:03 PM] [Workspace "vitest-ext-basic-example] Test run finished
[INFO 8:55:03 PM] Tests run end
[INFO 8:55:03 PM] WS Close
[INFO 8:55:03 PM] WS Close
[INFO 8:55:03 PM] API PROCESS EXIT
[INFO 8:55:03 PM] Vitest api process finished
[Error 8:55:03 PM] 
Failed to get any result
( Vitest should be configured to be able to run from project root )

Error when running
    ./node_modules/.bin/vitest /Users/joey/WebstormProjects/vitest-ext-basic-example/add.test.ts -t add 1 + 1

cwd: /Users/joey/WebstormProjects/vitest-ext-basic-example
node: v18.2.0

env.PATH: /Users/joey/.nvm/versions/node/v18.2.0/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/joey/.cargo/bin:/Users/joey/apps/fd:/Users/joey/.emacs.d/bin

[Error 8:55:03 PM] 

 DEV  v0.12.10 /Users/joey/WebstormProjects/vitest-ext-basic-example

      API started at http://localhost:65185



[INFO 8:55:03 PM]  ↓ add.test.ts  (1 test | 1 skipped)



Test Files  1 skipped (1)

     Tests  1 skipped (1)

      Time  909ms (in thread 0ms, Infinity%)





 PASS  Waiting for file changes...

       press h to show help, press q to quit

Seems like the test is skipped. By the way, when I ran the test manually outside of VSCode using the following command:

./node_modules/.bin/vitest /Users/joey/WebstormProjects/vitest-ext-basic-example/add.test.ts -t add 1 + 1

The test is passed as expected:

 DEV  v0.12.10 /Users/joey/WebstormProjects/vitest-ext-basic-example

 √ add.test.ts (1)

Test Files  1 passed (1)
     Tests  1 passed (1)
      Time  796ms (in thread 2ms, 39794.48%)


 PASS  Waiting for file changes...
       press h to show help, press q to quit

from vscode.

zachequi avatar zachequi commented on July 30, 2024 2

Same issue for me on linux, it looks like the websocket never connects (no WS Open message). I can confirm downgrading vitest works. Using latest vitest 0.22.1 and extension 0.2.28

from vscode.

fauxparse avatar fauxparse commented on July 30, 2024

+1

from vscode.

emanuelarcos avatar emanuelarcos commented on July 30, 2024

+1

from vscode.

zxch3n avatar zxch3n commented on July 30, 2024

Could you switch to the pre-release version and check whether it acts the same? If so, please attach the output log from Vitest to help me locate the issue.

image

I'm also using macOS, but I cannot reproduce this error. I need you guys' help, thanks.

from vscode.

searene avatar searene commented on July 30, 2024

@zxch3n

Hi, how to switch to the pre-release version? Are there any guidelines?

from vscode.

zxch3n avatar zxch3n commented on July 30, 2024

@searene You can do it in the extension homepage
image

from vscode.

benbender avatar benbender commented on July 30, 2024

Same problem on m1-osx with a solid-project :/

from vscode.

benblazak avatar benblazak commented on July 30, 2024

Works for me, following the steps to reproduce on an M1 Mac Mini, using the pre-release version of the plugin. Node 18.4.0 (and npm, not yarn, if that makes a difference).

I am having problems getting it to work in a svelte project (even a newly initialized one) though.

from vscode.

niktek avatar niktek commented on July 30, 2024

m1 Mac, svelte-kit project, it can see all the tests, but can't run them:

[INFO 3:01:36 pm] Tests run start
[INFO 3:01:36 pm] [Workspace "dev-skeleton] Run tests from workspace
[INFO 3:01:36 pm] [Execute Vitest] vitest /Users/nik/code/github/dev-skeleton/src/lib/Accordion/AccordionGroup.test.ts -t Accordion.svelte Renders without props
[INFO 3:01:36 pm] Start api process at port 55986
[INFO 3:01:36 pm] [RUN] vitest /Users/nik/code/github/dev-skeleton/src/lib/Accordion/AccordionGroup.test.ts -t Accordion.svelte Renders without props
[INFO 3:01:36 pm] [RUN.cwd] /Users/nik/code/github/dev-skeleton
[INFO 3:01:36 pm] WS Close
[INFO 3:01:37 pm] WS Close
[INFO 3:01:37 pm] WS Close
[INFO 3:01:37 pm] WS Close
[INFO 3:01:37 pm] WS Close

pnpm test runs the tests in the console fine.

Changed to npm and it got a lot further, but still didn't show any coloured tests:

[INFO 3:10:34 pm] Vitest Workspace [dev-skeleton]: Vitest version = 0.19.1
[INFO 3:10:51 pm] WS Close
[INFO 3:10:52 pm] 

 DEV  v0.19.1 /Users/nik/code/github/dev-skeleton

      API started at http://localhost:51204



[INFO 3:10:53 pm]  ✓ src/lib/Paginator/Paginator.test.ts  (2 tests) 22ms

 ✓ src/lib/CodeBlock/CodeBlock.test.ts  (1 test) 38ms

 ✓ src/lib/Button/Button.test.ts  (3 tests) 44ms

 ✓ src/lib/Avatar/Avatar.test.ts  (6 tests) 43ms

[INFO 3:10:53 pm] WS Close
[INFO 3:10:53 pm] WS Close
[INFO 3:10:54 pm]  ✓ src/lib/Accordion/AccordionItem.test.ts  (3 tests) 18ms

 ✓ src/lib/RangeSlider/RangeSlider.test.ts  (4 tests) 35ms

 ✓ src/lib/Table/DataTable.test.ts  (2 tests) 28ms

 ✓ src/lib/ConicGradient/ConicGradient.test.ts  (2 tests) 18ms

[INFO 3:10:54 pm] stderr | src/lib/Tab/TabGroup.test.ts > TabGroup.svelte > Renders without props

<TabGroup> was created without expected prop 'selected'



 ✓ src/lib/Tab/TabGroup.test.ts  (1 test) 11ms

 ✓ src/lib/Drawer/Drawer.test.ts  (2 tests) 14ms

 ✓ src/lib/Filters/filter.test.ts  (2 tests) 18ms

stderr | src/lib/Radio/RadioGroup.test.ts > RadioGroup.svelte > Renders without props

stderr | src/lib/Radio/RadioGroup.test.ts > RadioGroup.svelte > Renders with props

<RadioGroup> was created without expected prop 'selected'



<RadioGroup> was created without expected prop 'selected'



 ✓ src/lib/Radio/RadioGroup.test.ts  (2 tests) 11ms

[INFO 3:10:55 pm]  ✓ src/lib/Stepper/Step.test.ts  (2 tests) 19ms

stderr | src/lib/Stepper/Step.test.ts > Step.svelte > Renders without props

<Step> was created without expected prop 'index'



 ✓ src/lib/List/List.test.ts  (6 tests) 24ms

 ✓ src/lib/Breadcrumb/Crumb.test.ts  (2 tests) 14ms

 ✓ src/lib/Alert/Alert.test.ts  (2 tests) 16ms

[INFO 3:10:55 pm] WS Close
[INFO 3:10:55 pm] WS Close
[INFO 3:10:56 pm]  ✓ src/lib/Divider/Divider.test.ts  (2 tests) 14ms

 ✓ src/lib/GradientHeading/GradientHeading.test.ts  (6 tests) 19ms

stderr | src/lib/Radio/RadioItem.test.ts > RadioItem.svelte > Renders without props

 ✓ src/lib/Radio/RadioItem.test.ts  (2 tests) 27ms

<RadioItem> was created without expected prop 'value'



 ✓ src/lib/SlideToggle/SlideToggle.test.ts  (2 tests) 16ms

[INFO 3:10:56 pm]  ✓ src/lib/List/NavItem.test.ts  (1 test) 11ms

[INFO 3:10:56 pm]  ✓ src/lib/Accordion/AccordionGroup.test.ts  (2 tests) 11ms

stderr | src/lib/Accordion/AccordionGroup.test.ts > Accordion.svelte > Renders without props

<AccordionGroup> was created without expected prop 'selected'



stderr | src/lib/Accordion/AccordionGroup.test.ts > Accordion.svelte > Renders with props

<AccordionGroup> was created without expected prop 'selected'



 ✓ src/lib/Badge/Badge.test.ts  (2 tests) 12ms

 ✓ src/lib/Progress/ProgressBar.test.ts  (2 tests) 12ms

[INFO 3:10:57 pm]  ✓ src/lib/List/ListItem.test.ts  (1 test) 13ms

 ✓ src/lib/LogoCloud/Logo.test.ts  (1 test) 10ms

 ✓ src/lib/Tooltip/Tooltip.test.ts  (2 tests) 11ms

 ✓ src/lib/Stepper/Stepper.test.ts  (2 tests) 11ms

[INFO 3:10:57 pm]  ✓ src/lib/Tab/Tab.test.ts  (1 test) 10ms

 ✓ src/lib/Breadcrumb/Breadcrumb.test.ts  (1 test) 9ms

 ✓ src/lib/Card/Card.test.ts  (2 tests) 11ms

 ✓ src/lib/LogoCloud/LogoCloud.test.ts  (1 test) 9ms

[INFO 3:10:57 pm] WS Close
[INFO 3:10:57 pm] WS Close
[INFO 3:10:58 pm]  ↓ src/lib/LightSwitch/LightSwitch.test.ts  (2 tests | 2 skipped)

 ↓ src/lib/Menu/Menu.test.ts  (3 tests | 3 skipped)



Test Files  32 passed | 2 skipped (34)

     Tests  72 passed | 5 skipped (77)

      Time  5.94s (in thread 579ms, 1026.52%)





 PASS  Waiting for file changes...

       press h to show help, press q to quit

[INFO 3:10:59 pm] WS Close
[INFO 3:10:59 pm] WS Close
[INFO 3:11:01 pm] WS Close
[INFO 3:11:01 pm] WS Close
[INFO 3:11:03 pm] WS Close
[INFO 3:11:03 pm] WS Close
[INFO 3:11:05 pm] WS Close
[INFO 3:11:05 pm] WS Close
[INFO 3:11:07 pm] WS Close
[INFO 3:11:07 pm] WS Close
[INFO 3:11:09 pm] WS Close
[INFO 3:11:09 pm] WS Close

from vscode.

ahoyahoy avatar ahoyahoy commented on July 30, 2024

version 0.2.15 works for me as the last one
win 10, node 16

from vscode.

zxch3n avatar zxch3n commented on July 30, 2024

This issue should be fixed now. If it's still wrong, let me know

from vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.