- Create a browser-like environment and load an application (html+js).
- Generate events.
- Make various assertions about the shape of DOM and XHR calls.
(I've been using envjs for it's html parser and json implementation
for a few weeks now in another project. In that project, I used
envjs 1.2 with python-spidermonkey and in the titanium environment.)
I'm using python-spidermonkey.
If I execute spidermonkey.py and then load spidermonkey.js, my
process exits. If I try:
bin/envjs spyd t.js
where t.js is:
window.location = 'http://www.zope.com/';
Again, the process exits.
(I have to create an empty local_settings.js file to avoid an error,
but that's a minor issue afaict.)
Am I doing something wrong?
From the event loop discussion, I sort of expected that after
setting the window location, something would wait for events.
Looking at the code, it seems that envjs exists when there
aren't more events.
What I suspect I want is to emit an event, run the event loop
until it stops, make assertions about what happened, rinse, and
I'll keep hacking. I suspect I just want to make exit a noop, but I
also suspect I'm missing some basic zen.