jest icon indicating copy to clipboard operation
jest copied to clipboard

fix: allow templating of null and undefined in a jest each key path template

Open Germandrummer92 opened this issue 1 year ago • 3 comments

Summary

See newly added e2e tests, currently jest crashed with:

 ● allows templating "$array.length"

    Cannot convert undefined or null to object

       7 | });

when adding a nested keypath as a template in a null or undefined object. Instead we just early-exit out of interplation in those cases.

Test plan

  • yarn test yarn constraints

Germandrummer92 avatar Jan 04 '24 17:01 Germandrummer92

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Germandrummer92 / name: Daniel Draper (87febe76ffe9ad85260946f15d9a395e58ae1655, 6ae80f6aa08adad149c8898e63e8cc6c0045922b, 8f6e0a04d3c3d2c2db285c739ef02718604e5825, c67c4bfb81bc8a7eae68c9c07b9e29500a473c73)
  • :white_check_mark: login: SimenB / name: Simen Bekkhus (421d9a8fa1d32336364926f4892eec0ad37705fd)

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
Latest commit 6ae80f6aa08adad149c8898e63e8cc6c0045922b
Latest deploy log https://app.netlify.com/sites/jestjs/deploys/65eb3067294bde000872d19b
Deploy Preview https://deploy-preview-14831--jestjs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 04 '24 17:01 netlify[bot]

hmm, not sure why the tests are now failing 😢

Germandrummer92 avatar Feb 06 '24 14:02 Germandrummer92

The one failing test is a known one

SimenB avatar Mar 08 '24 11:03 SimenB

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

github-actions[bot] avatar Apr 19 '24 00:04 github-actions[bot]

https://github.com/jestjs/jest/releases/tag/v30.0.0-alpha.4

SimenB avatar May 12 '24 21:05 SimenB