Patches, Forks, and Tests

1 view
Skip to first unread message

Eric Mill

unread,
May 1, 2008, 3:36:52 PM5/1/08
to Jester JS
So I think I'm all caught up now on integrating everybody's patches
and git forks/commits into Jester. If you were one who submitted
code, thank you!

One of the reasons it took me a while to do this is because
integrating the work wasn't trivial, because I had to write tests for
each patch. I'm not going to insist that people write tests for every
patch they submit - I'd rather keep the barrier of submission low, and
not everyone in the JS world knows jsUnit like the Rails community
knows Test::Unit.

But, if you do provide test coverage along with your commit, it makes
it a lot easier, and quicker, for me to get your work into the master
branch. It also makes it easier to convince me the patch is worth it,
if it's a feature enhancement and not just a bugfix. It also means an
ego boost, as your code gets in unaltered, whereas if I do it manually
I'm liable to make it look more like my own. :)

So yeah, I'm not annoyed at having to write tests (yet), I'm just
saying that test coverage will help make the master branch progression
smooth.

Thanks again for everyone's contributions!

-- Eric

Nat Budin

unread,
May 1, 2008, 5:53:47 PM5/1/08
to jest...@googlegroups.com
Forgive me if this is a stupid newbie question - I've never used JSUnit before.

So, as requested, I've been attempting to code up some tests for my
scoped delete patch. After some mucking around, I got the test runner
working, but when I attempt to run it, every single unit test fails
with the same error:

TypeError: params.unset is not a function

Am I doing something newbishly stupid?

Nat

Eric Mill

unread,
May 2, 2008, 10:43:39 AM5/2/08
to Jester JS
Do you have prototype.js sitting alongside jester.js? It's not in the
repo, but since it's required for Jester to work, the test suite needs
it too.

You can open the testRunner.html file with either file:// or http://.
I recommend using file://, as I've found that if you do it with http://,
your browser caches jester_test.html. You can counter this by
disabling your cache, or opening jester_test.html in its own tab
(it'll just be a blank page) and hitting Reload/Refresh on your
browser. So just use file://. Unfortunately, FF3b5 on Ubuntu for
some reason now is halting at test 12 every time I run it on file://,
but not http://. These are the days.

-- Eric

On May 1, 5:53 pm, "Nat Budin" <natbu...@gmail.com> wrote:
> Forgive me if this is a stupid newbie question - I've never used JSUnit before.
>
> So, as requested, I've been attempting to code up some tests for my
> scoped delete patch.  After some mucking around, I got the test runner
> working, but when I attempt to run it, every single unit test fails
> with the same error:
>
> TypeError: params.unset is not a function
>
> Am I doing something newbishly stupid?
>
> Nat
>

Nat Budin

unread,
May 2, 2008, 4:11:34 PM5/2/08
to jest...@googlegroups.com
I figured it out - it seems that if you're running JSUnit under
Firefox 3, you need to set a special config setting to lower the
security checks on file:/// URIs. More information on this can be
found here:

http://kb.mozillazine.org/Security.fileuri.origin_policy

I'll be checking in a patch and some new test cases into my repo fork soon.

Nat

Eric Mill

unread,
May 19, 2008, 5:26:12 PM5/19/08
to Jester JS
Hmm, I investigated this, and I wasn't able to fix my problems by
changing this setting (which is actually now
security.fileuri.strict_origin_policy, as talked about at the linked
page). Did this work for you, Nat?

-- Eric

On May 2, 4:11 pm, "Nat Budin" <natbu...@gmail.com> wrote:
> I figured it out - it seems that if you're running JSUnit under
> Firefox 3, you need to set a special config setting to lower the
> security checks on file:/// URIs.  More information on this can be
> found here:
>
> http://kb.mozillazine.org/Security.fileuri.origin_policy
>
> I'll be checking in a patch and some new test cases into my repo fork soon.
>
> Nat
>

Nat Budin

unread,
May 19, 2008, 5:29:00 PM5/19/08
to jest...@googlegroups.com
It did work for me. Unfortunately, I can't remember at this point
whether I also did anything else to fix the issues I was having.
Sorry about that!

Nat

Reply all
Reply to author
Forward
0 new messages