make-runnable icon indicating copy to clipboard operation
make-runnable copied to clipboard

Pretty print whole object, rather than truncating to [Object] ?

Open evilC opened this issue 2 years ago • 2 comments

Hi, I want to test a function that returns an object, but it is only shallow printing the object.

ie given the following return object

{
   "customerAccountsRs": {
      "fullName": "Fred Single",
      "account": [
         {
            "sortCodeAcctNum": "400216-00001001"
         }
      ]
   }
}

make-runnable only prints

{
  customerAccountsRs: { fullName: 'Fred Single', account: [ [Object] ] }
}

Could you add this option? If not, if I made a PR, would you merge in? I notice #7 has languished for years, so not really up for putting in the effort if you are not gonna merge it

evilC avatar Apr 04 '22 15:04 evilC

I've finally merged the old PR! Sorry about the delayed reply 😅 I'm back and here to stay.

super-cache-money avatar Oct 10 '22 16:10 super-cache-money

But yeah @evilC - this sounds like a great idea. If you submit a PR - I'll merge.

super-cache-money avatar Oct 12 '22 16:10 super-cache-money