fix(test): substitute %s for non-string values in test.each titles

Closed
DE
9d ago
+22-1

Fixes #37821

test.each / describe.each only substituted %s\ when the value was already a string; numbers, floats, booleans and other non-string values left the literal %s\ in the test title. %d/%f/%p\ already accepted both.

Matches Jest's behavior, where titles are formatted through \util.format\ and %s\ stringifies any value via \String(value).

  • src/runtime/test_runner/jest.rs: drop the string-only gate on %s\ (keep the empty-value guard, which keeps the placeholder for empty args like the other specifiers)
  • test/cli/test/bun-test.test.ts: regression test asserting substituted titles for integer, float and mixed-tuple cases