Comments (10)
do you app.close() at some point?
from tobi.
No, I dont. ;) Should I do that in the tests? ;)
(Captain Obvious again kicked me in the butt)
from tobi.
:) unlike assert.response() no effort is made to auto-close the server since it is not uncommon to nest requests
from tobi.
I'm running tobi against a remote website, so without app
.
All tests pass but the process remains open for me as well. How should I close it in my case?
from tobi.
you can access the http client via browser.client
so you can call close() etc when you are done
from tobi.
Thanks : )
I found that for servers that set the Transfer-Encoding: chunked header, a
browser.client.end()
will not do anything. On other servers it works as expected.
For now I think I can just
process.exit(0)
but It'd be cool if there was a nicer way to achieve this.
from tobi.
+1 for "nicer way to achieve this"
also browser.client
no longer exists, is there perhaps something else I can try? Mainly cause I can't use process.exit()
from within a nodeunit test without it complaining.
from tobi.
I cant think of a nicer way to deal with this sort of thing. If you're not nesting requests it's possible to just use a number to count the pending requests and auto-close the server, which is what I do with assert.response()
, however Tobi stuff is almost always nested so that does not work. I'm making sure that with my Expresso successor that the test framework explicitly exit()s to prevent this sort of headache
from tobi.
I'm interested as to what is actually preventing the process from quitting?
from tobi.
the server is still listening for connections
from tobi.
Related Issues (20)
- browser.click('a') doesn't request a url but bind a function with a click event.
- browser.post json object
- testing JSON responses HOT 2
- How do I use with Zappa? HOT 1
- cookies on header HOT 1
- Simple tobi usage results in exception
- Installing tobi, errors node v0.6.1
- Tobi is broken in node 0.6.5 (at least for me) HOT 8
- Sharing cookies between subdomains
- CSRF_COOKIE header used by .submit() doesn't seem to match cookieJar
- Tobi incompatible with should-style Chai HOT 2
- tobi makes 500 error for later calls
- Always attach `body` to response object? HOT 1
- Exporting the cookie-jar as its own module HOT 2
- Err: The "sys" module is now called "util" HOT 1
- Redirect to location start with '//' cause 404 error.
- Parsing cookie's path with uppercase 'Path' cause exception
- relative path cannot be parsed
- Compatibility with node 0.8?
- Require ('app') for express 3.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tobi.