Tsdx: test not running in watch mode by default

Created on 10 Nov 2019  路  12Comments  路  Source: formium/tsdx

Current Behavior

yarn test isn't running in interactive mode

Expected behavior

to have tests run in interactive/watch mode.

Suggested solution(s)

run jest in watch mode when tsdx test is run.

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| TSDX | 0.11.0
| TypeScript | 3.7.2
| Browser | N/A
| npm/Yarn | Yarn
| Node | 12.8.1
| Operating System | MacOS Mojave version 10.14.4

feature docs

Most helpful comment

@MartijnHols @ambroseus we are reverting the "watch mode by default" behavior we added a month ago - sorry for the flipflop. more info https://github.com/jaredpalmer/tsdx/issues/408

All 12 comments

can you suggest a way to pass thru all flags down into jest? this might help support all of jest's other features.

I wonder if we can use bash's $@ as mentioned in this post:

https://stackoverflow.com/a/3816747/6107169

something like jest -- "$@"

eh i think we have better ways to do that programmatically. but feel free to open up a pr and do what works!

what do you suggest?

@tylerthehaas, sorry if I misunderstood, but isn't yarn test --watch what you need?

Yeah all we should do is key off of whether CI=true IMHO

that works. nice 1-2 liner.

Previously I could use yarn test for a single run and yarn test --watch for watching. Is it no longer possible to make it run just once outside of CI now?

@MartijnHols just add CI=true explicitly
"test": "CI=true tsdx test --color"
"test:coverage": "CI=true tsdx test --color --coverage"

or ctrl + C to kill :)

@MartijnHols @ambroseus we are reverting the "watch mode by default" behavior we added a month ago - sorry for the flipflop. more info https://github.com/jaredpalmer/tsdx/issues/408

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agentofuser picture agentofuser  路  3Comments

Weffe picture Weffe  路  4Comments

NateRadebaugh picture NateRadebaugh  路  3Comments

smashercosmo picture smashercosmo  路  6Comments

MarceloAlves picture MarceloAlves  路  4Comments