winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.07k stars 198 forks source link

`pnpm turbo test` never exits after success #7095

Closed Chriscbr closed 2 months ago

Chriscbr commented 2 months ago

I tried this:

I ran pnpm turbo test to build and run all tests in the project.

This happened:

The process never finishes because the command for running tests on @wingconsole/utilities hangs. Here is my output if I run pnpm turbo test -F @wingconsole/utilities:

chrisr wing1 $ pnpm turbo test -F @wingconsole/utilities
turbo 2.1.1

• Packages in scope: @wingconsole/utilities
• Running test in 1 packages
• Remote caching disabled
@wingconsole/utilities:test: cache miss, executing c62b4cd74d312904
@wingconsole/utilities:test:
@wingconsole/utilities:test:
@wingconsole/utilities:test: > @wingconsole/utilities@0.0.0 test /Users/chrisr/dev/wing1/wing-console/packages/utilities
@wingconsole/utilities:test: > vitest
@wingconsole/utilities:test:
@wingconsole/utilities:test:
@wingconsole/utilities:test:  DEV  v1.6.0 /Users/chrisr/dev/wing1/wing-console/packages/utilities
@wingconsole/utilities:test:
 ✓ src/debounce.test.ts (1)
@wingconsole/utilities:test:  ✓ src/uniq-by.test.ts (2)
@wingconsole/utilities:test:  ✓ src/escape-html.test.ts (1)
@wingconsole/utilities:test:  ✓ src/throttle.test.ts (2)
@wingconsole/utilities:test:  ✓ src/read-lines.test.ts (5)
@wingconsole/utilities:test:
@wingconsole/utilities:test:  Test Files  5 passed (5)
@wingconsole/utilities:test:       Tests  11 passed (11)
@wingconsole/utilities:test:    Start at  18:28:40
@wingconsole/utilities:test:    Duration  172ms (transform 122ms, setup 0ms, collect 175ms, tests 19ms, environment 0ms, prepare 263ms)
@wingconsole/utilities:test:
@wingconsole/utilities:test:
@wingconsole/utilities:test:  PASS  Waiting for file changes...
@wingconsole/utilities:test:        press h to show help, press q to quit

After this is printed, the command just hangs. Pressing q doesn't work so I have to Ctrl + C to kill the process.

I expected this:

The test exits happily

Is there a workaround?

Ctrl+C once it looks like everything is done

Anything else?

No response

Wing Version

0.84.5

Node.js Version

20.17.0

Platform(s)

No response

Community Notes

skyrpex commented 2 months ago

Right... my fault! The @wingconsole/utilities:test script runs vitest (without additional commands). The vitest commands runs vitest run (single shot test runner) in non-interactive environments (such as CI), and vitest watch in the rest of environments.

Will change it to vitest run.

monadabot commented 2 months ago

Congrats! :rocket: This was released in Wing 0.84.6.

monadabot commented 2 months ago

Congrats! :rocket: This was released in Wing 0.84.7.