testbook icon indicating copy to clipboard operation
testbook copied to clipboard

Replace all tb.ref examples in docs with tb.get

Open rohitsanj opened this issue 3 years ago • 2 comments

With #92, a new way of creating reference objects was introduced.

  • We will need to replace all instances of tb.ref with tb.get and also mention that one can use the indexing pattern to create the objects.
  • Also mention that when the object is JSON serializable, when tb.get is called on that variable, the actual value will be fetched, and not the reference object, which was the case before. (This is the actual reason why we need to move away from tb.ref examples because they no longer return "references" always.)
  • Provide a few code examples to demonstrate the new pattern.

This piece of code outlines the different ways we can create testbook reference objects as of now.

rohitsanj avatar May 22 '21 16:05 rohitsanj

hi there @rohitsanj i would love to pick up this issue

Boluwatifeh avatar May 24 '21 02:05 Boluwatifeh

and just to be clear, tb.get doesnt really return the reference to the objects but the objects itself. What i would be working on is to replace all reference of tb.ref with tb.get since the implementation has changed in the source code according to issue #92

Boluwatifeh avatar May 24 '21 03:05 Boluwatifeh