functions. I wonder if we should completely drop that (or simply don't
push it as the preferred method). That's dropping the function and
string type test suites and supporting only object and array. What are
function. Something in the lines of "jsUnity.applyAssertions([scope])"
where scope defaults to the current scope. We can vote on the most
On Feb 2, 1:31 am, Zach Carter <
Zack.Car...@gmail.com> wrote:
> Hey Ates,
>
> The caution I have about serializing functions is that you'll loose
> the local environment they were defined in, like the value of local
> variables defined outside of the test suite. Generally, any tricky
> closure stuff could possibly be lost, though perhaps that is not good
> practice in test writing anyway? Something to ponder; I realize the
> function style tests are already serialized this way.
>
> Though, another idea for people that really don't mind global assert
> functions: they could easily introduce them to the global scope by
> iterating over the jsUnity.assertions module and adding them to the
> global object. jsUnity could even provide a helper method for this
> (jsUnity.exposeAsserts() ?) Others could use explicit with(...) or
> attach asserts to the test suite if self like jsUnitTest[1]
> (this.assertTrue()), or even still, YUI style[2].
>