Today I Learned

hashrocket A Hashrocket project

Jest Expect Object Containing

I used to do this a lot:

const { somethingIDontCareAbout, ...everthingIDoCareAbout } = stuff

Now I learned about objectContaining and I can do this instead:


H/T Dillon Hafer

See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.