You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs - actually, the Getting Started one, available here, next-to-last paragraph - say we can pass a constructor as an argument to td.object() method.
That seems not true anymore, since we currently have this:
Since this part of the tutorial is trying to show the library is smart enough to hunt for any method defined on the function's prototype, I think we should change it to pass an instance rather than the constructor, since the td.constructor() method apparently doesn't hunt for prototyped methods:
describe('MathProblem',function(){varsubject,createRandomProblem,savesProblem;beforeEach(function(){createRandomProblem=td.function('createRandomProblem')savesProblem=td.object(newSavesProblem())subject=newMathProblem(createRandomProblem,savesProblem)})it('POSTs a random problem',function(){// ...})})
What you think, guys? Or am I wrong?
The text was updated successfully, but these errors were encountered:
Description
The docs - actually, the Getting Started one, available here, next-to-last paragraph - say we can pass a constructor as an argument to
td.object()
method.That seems not true anymore, since we currently have this:
Since this part of the tutorial is trying to show the library is smart enough to hunt for any method defined on the function's prototype, I think we should change it to pass an instance rather than the constructor, since the
td.constructor()
method apparently doesn't hunt for prototyped methods:What you think, guys? Or am I wrong?
The text was updated successfully, but these errors were encountered: