Im trying to run tests with `pants test expo2/type...
# general
s
Im trying to run tests with
pants test expo2/typescript/src/expo2/api/::
but I get
Copy code
$ pants test expo2/typescript/src/expo2/api/::
$
If I run
pants peek expo2/typescript/src/expo2/api/
I see
Copy code
{
  "address": "expo2/typescript/src/expo2/api/workflows.test.ts:tests",
  "target_type": "typescript_test",
  "batch_compatibility_tag": null,
  "dependencies": [
    "expo2/typescript:pkg#msw",
    "expo2/typescript:pkg#vitest",
    "expo2/typescript/src/expo2/api/workflows.ts",
    "expo2/typescript/src/expo2/mocks/server.ts"
  ],
  "dependencies_raw": null,
  "description": null,
  "extra_env_vars": null,
  "source_raw": "workflows.test.ts",
  "sources": [
    "expo2/typescript/src/expo2/api/workflows.test.ts"
  ],
  "sources_fingerprint": "51e9a708192b2f453aa3b67a4f32755add52763fa87a1a2ba1e02b58cdb7e7cb",
  "tags": null,
  "timeout": null
}
Any idea why
pants test
is doing nothing? My Build file looks like
Copy code
typescript_sources()

typescript_tests(
    name="tests",
)
Oh theres a node_test_script
I added that but still nothing happens. How might I try to debug this?
fwiw
pnpm --dir expo2/typescript/ run test
works. What I don’t get is why pants is deciding to
noop
. I have tests, I’ve copied the javascript repo the best I can. Pants just doesn’t want to do anythig
If I add typescript to https://github.com/pantsbuild/example-javascript# and change a js test to .ts (and add typescript_tests via pants tailor) the test disappears. Do typescript_tests do anything?
h
cc @worried-painter-31382 but I would assume
typescript_tests()
is supposed to do something... So this sounds like a problem
w
The typescript backend was very broken until later versions of pants, I dont have a way of checking what version is the lowest applicable were I am but I think maybe 2.28.0 was the first to release with a fix
s
Im running with 2.28. I can make a repo if that helps
w
I will not be debugging this issue tonight. It is always helpful to post issues including reproductions here: https://github.com/pantsbuild/pants/issues.
s
Sounds good.
w
s
Sorry for the delay! But finally got around to creating https://github.com/pantsbuild/pants/issues/22754
w
Looks good, feel free to open a PR and ask for my review. The patch is sound.
For future reference this turned out to be a feature request which also got implemented!
🚀 1