Code Monkey home page Code Monkey logo

expresso's People

Contributors

alsonkemp avatar andrewjstone avatar bookcasey avatar christiaan avatar danielbeardsley avatar einaros avatar kkaefer avatar kpdecker avatar luebken avatar masylum avatar nateps avatar proppy avatar rauchg avatar renajohn avatar roadhump avatar spmason avatar tj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expresso's Issues

Add server response assertion support

very very common in all my projects so this would be nice to abstract. We need to increment pending responses, and kill the server when we are done

expresso on command line requires node 0.1.102

Older versions of node:

$ expresso ....

"Cannot find module './../lib/node/.npm/expresso/0.6.1/package/bin/expresso'"

This is fixed in node 0.1.102.

Should expresso require { "engines":{"node":">=0.1.102"}}?

Add "setup" for async test cases

Even if most of the test cases can be ran async, there are still use cases for having a setup function, and then running the rest of the test suite async.

simple seems to work patch:
https://gist.github.com/7d89e159355d57a0663a

It invokes the setup() once globally, rather than before each test case as in serial. In addition, it b0rks serial by calling setup an extra time. tj suggested giving it a different name....

Feature request: assert.expect

Currently using nodeunit I love how it internally counts the number of assertions I make. If I start my test with
test.expect(2);
it would then check if all two assertions ran, which is very useful in async code.

I know this can be done in expresso, but it's not as easy here.

series tests are slow with server ?

Hi the series testing of assert.response is pretty slow - is this because it's creating a server for each test ?

Would it be possible to create 1 and then do series testing ?

Maybe the 0.6.4 canot works with node-v0.3.0?

When i use node-v0.3.0:

module.exports = {
'test index page': function(assert){
    var s = require('../server.js').s;
    assert.response(s,
    {
        url: '/'
    },
    {
        status: 200
    });
}
};

It throw errors:

uncaught: Error: ECONNREFUSED, Connection refused
at IOWatcher.callback (net.js:877:22)
at node.js:634:9

but i switch to node-v0.2.4, the test passed.

Allow overriding of 'report' and 'reportCoverage' to produce data for consumption by reporting systems like a hudson dashboard page

The 'report' and 'reportCoverage' methods are great for casual use, but often one wants to save the reports into some kind of reporting database. For example one wants to be able to track results over time e.g. so that project managers can tell whether the project is getting better or worse by which way the test failure counts are going.

If the output from 'report' were a proper data format (XML or something) it could be parsed and manipulated and datamined beyond belief. Similarly if 'reportCoverage' were in a proper code coverage reporting format then it could be displayed on something like a hudson console page.

One way to implement this might be to allow these two methods to be overridden ...?

problem with working with child processes

Hi

I've got a child process that I'm trying to test through expresso. The trouble is - even though I'm sending a SIGTERM through .kill(), it seems to cause expresso to hang (btw this is running in --serial).

I found I could fix it by adding in 2 lines to the runFiles function:

function runFiles(files) {
    if (serial) {
        (function next(){
            if (files.length) {
              runFile(files.shift(), next);
            } else {
              process.exit(0)   // ---- new
            }
        })();
    } else {
      files.forEach(runFile);
    }
}
  • I don't know if this has any ramifications elsewhere ?

get rid of --serial option

it would be nice to mix and match serial and non serial tests - especially to not have to run them differently.

i wonder whether the function's length could be used to determine if the test was async or sync.

E.g.

serial = test.length == 1

I realise this would be a fairly significant refactor, but I think it might prove significantly more usable.

Add way to run specific test suites serially

Basically, most test suites can be run async, but maybe 1 in 10 need to be serial, so its a drag to run all of them with --serial.

Add some attribute to the module export, and if present, run this test suite with the serial behavior.

exports.force_serial = true;

Is the simplest example.

If it is envisioned that there will be many more configuration tunables, it might make sense to have something more complex, like exports.test_options = {serial: true, something_else: false}.

Sometimes, thrown exception messages are obfuscated by the exception handler

When my code throws an exception, I often get the output below instead of the actual exception:

/usr/local/bin/expresso:648
stack = err.stack.replace(err.name, ''),
^
TypeError: Cannot call method 'replace' of undefined
at error (/usr/local/bin/expresso:648:27)
at next (/usr/local/bin/expresso:684:21)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)
at next (/usr/local/bin/expresso:687:13)

Here is a sample test to reproduce this - http://gist.github.com/503625

scoping

would be great if I could split tests into sub suites. smth like the following:

module.exports = {
'module': {
'submodule': function(assert) {}
}
}

Installing via `npm` does not work correctly

For some reason, installing expresso via npm does not work correctly. The install seems to complete just fine, but require('expresso') throws an error:

Error: Cannot find module 'expresso'
    at loadModule (node.js:275:15)
    at require (node.js:411:14)
    at cwdRequire (repl:29:10)
    at [object Context]:1:1
    at Interface.<anonymous> (repl:96:19)
    at Interface.emit (events:27:15)
    at Interface._ttyWrite (readline:309:12)
    at Interface.write (readline:147:30)
    at Stream.<anonymous> (repl:79:9)
    at Stream.emit (events:27:15)

Here's the complete npm install log:

macn-dand:~ $ npm install expresso
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info preinstall [email protected]
cd deps/jscoverage && ./configure && make && mv jscoverage node-jscoverage
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking build system type... i386-apple-darwin10.5.0
checking host system type... i386-apple-darwin10.5.0
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ld used by GCC... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking whether byte ordering is bigendian... no
checking for getaddrinfo... yes
checking for gethostbyname_r... no
checking for inet_aton... yes
checking for strndup... no
checking for vasprintf... yes
checking for asprintf... yes
checking for MultiByteToWideChar... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating make-dist.sh
config.status: creating make-bin-dist.sh
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT generate-resources.o -MD -MP -MF .deps/generate-resources.Tpo -c -o generate-resources.o generate-resources.c
mv -f .deps/generate-resources.Tpo .deps/generate-resources.Po
gcc -std=gnu99 -Ijs -Ijs/obj -DXP_UNIX -g -O2   -o generate-resources generate-resources.o  
./generate-resources jscoverage-help.txt jscoverage-server-help.txt jscoverage.jsm jscoverage.manifest jscoverage.xul jscoverage-overlay.js jscoverage.html jscoverage.css jscoverage-ie.css jscoverage-highlight.css jscoverage.js report.js jscoverage-throbber.gif > resources.c
make  all-recursive
Making all in js
make -f Makefile.ref DISABLE_JIT=1 OBJROOT=obj BUILD_OPT=1
Makefile.ref:61: disabling JIT per build specification
cd editline; make -f Makefile.ref all
mkdir -p ../obj/editline
gcc -o ../obj/editline/editline.o -c -Wall -Wno-format -MMD -DXP_UNIX -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand  -DJSFILE  -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DHAVE_STDLIB -DUNIQUE_HISTORY editline.c
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
editline.c: In function ‘add_history’:
editline.c:1050: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness
editline.c: In function ‘reposition’:
editline.c:313: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
editline.c: In function ‘readline’:
editline.c:1025: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
editline.c: In function ‘redisplay’:
editline.c:506: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
editline.c:507: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
editline.c: In function ‘h_search’:
editline.c:659: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
editline.c:664: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
gcc -o ../obj/editline/sysunix.o -c -Wall -Wno-format -MMD -DXP_UNIX -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand  -DJSFILE  -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DHAVE_STDLIB -DUNIQUE_HISTORY sysunix.c
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
ar rv ../obj/editline/libedit.a ../obj/editline/editline.o ../obj/editline/sysunix.o
ar: creating archive ../obj/editline/libedit.a
a - ../obj/editline/editline.o
a - ../obj/editline/sysunix.o
ranlib ../obj/editline/libedit.a
make -f Makefile.ref  ./obj/libjs.a ./obj/libjs.dylib ./obj/js 
Makefile.ref:61: disabling JIT per build specification
g++ -o obj/jscpucfg.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jscpucfg.cpp
g++  -o obj/jscpucfg ./obj/jscpucfg.o
rm -f obj/jsautocfg.h
./obj/jscpucfg > obj/jsautocfg.h
g++ -o ./obj/jskwgen -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2   jskwgen.cpp
./obj/jskwgen obj/jsautokw.h
g++ -o ./obj/jsoplengen -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2   jsoplengen.cpp
./obj/jsoplengen obj/jsautooplen.h
sed < js-config.h.in > obj/js-config.h.tmp          \
            \
                \
        -e :dummy
if ! [ -f obj/js-config.h ] || ! cmp obj/js-config.h.tmp obj/js-config.h; then \
        mv obj/js-config.h.tmp obj/js-config.h;                   \
    fi
touch obj/js-config.h.stamp
g++ -o obj/jsapi.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsapi.cpp
g++ -o obj/jsarena.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsarena.cpp
g++ -o obj/jsarray.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsarray.cpp
g++ -o obj/jsatom.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsatom.cpp
g++ -o obj/jsbool.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsbool.cpp
g++ -o obj/jscntxt.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jscntxt.cpp
g++ -o obj/jsdate.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsdate.cpp
g++ -o obj/jsdbgapi.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsdbgapi.cpp
g++ -o obj/jsdhash.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsdhash.cpp
g++ -o obj/jsdtoa.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsdtoa.cpp
g++ -o obj/jsemit.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsemit.cpp
g++ -o obj/jsexn.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsexn.cpp
g++ -o obj/jsfun.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsfun.cpp
g++ -o obj/jsgc.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsgc.cpp
g++ -o obj/jshash.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jshash.cpp
g++ -o obj/jsinterp.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -O3 -fstrict-aliasing -fno-exceptions -fno-rtti jsinterp.cpp
g++ -o obj/jsinvoke.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsinvoke.cpp
g++ -o obj/jsiter.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsiter.cpp
g++ -o obj/jslock.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jslock.cpp
g++ -o obj/jslog2.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jslog2.cpp
g++ -o obj/jslong.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jslong.cpp
g++ -o obj/jsmath.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsmath.cpp
g++ -o obj/jsnum.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsnum.cpp
g++ -o obj/jsobj.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsobj.cpp
g++ -o obj/json.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 json.cpp
g++ -o obj/jsopcode.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsopcode.cpp
g++ -o obj/jsparse.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsparse.cpp
g++ -o obj/jsprf.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsprf.cpp
g++ -o obj/jsregexp.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsregexp.cpp
g++ -o obj/jsscan.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsscan.cpp
g++ -o obj/jsscope.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsscope.cpp
g++ -o obj/jsscript.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsscript.cpp
g++ -o obj/jsstr.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsstr.cpp
g++ -o obj/jsutil.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsutil.cpp
g++ -o obj/jsxdrapi.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsxdrapi.cpp
g++ -o obj/jsxml.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 jsxml.cpp
g++ -o obj/prmjtime.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 prmjtime.cpp
ar rv obj/libjs.a obj/jsapi.o obj/jsarena.o obj/jsarray.o obj/jsatom.o obj/jsbool.o obj/jscntxt.o obj/jsdate.o obj/jsdbgapi.o obj/jsdhash.o obj/jsdtoa.o obj/jsemit.o obj/jsexn.o obj/jsfun.o obj/jsgc.o obj/jshash.o obj/jsinterp.o obj/jsinvoke.o obj/jsiter.o obj/jslock.o obj/jslog2.o obj/jslong.o obj/jsmath.o obj/jsnum.o obj/jsobj.o obj/json.o obj/jsopcode.o obj/jsparse.o obj/jsprf.o obj/jsregexp.o obj/jsscan.o obj/jsscope.o obj/jsscript.o obj/jsstr.o obj/jsutil.o obj/jsxdrapi.o obj/jsxml.o obj/prmjtime.o
ar: creating archive obj/libjs.a
a - obj/jsapi.o
a - obj/jsarena.o
a - obj/jsarray.o
a - obj/jsatom.o
a - obj/jsbool.o
a - obj/jscntxt.o
a - obj/jsdate.o
a - obj/jsdbgapi.o
a - obj/jsdhash.o
a - obj/jsdtoa.o
a - obj/jsemit.o
a - obj/jsexn.o
a - obj/jsfun.o
a - obj/jsgc.o
a - obj/jshash.o
a - obj/jsinterp.o
a - obj/jsinvoke.o
a - obj/jsiter.o
a - obj/jslock.o
a - obj/jslog2.o
a - obj/jslong.o
a - obj/jsmath.o
a - obj/jsnum.o
a - obj/jsobj.o
a - obj/json.o
a - obj/jsopcode.o
a - obj/jsparse.o
a - obj/jsprf.o
a - obj/jsregexp.o
a - obj/jsscan.o
a - obj/jsscope.o
a - obj/jsscript.o
a - obj/jsstr.o
a - obj/jsutil.o
a - obj/jsxdrapi.o
a - obj/jsxml.o
a - obj/prmjtime.o
/usr/bin/ranlib: file: obj/libjs.a(jslock.o) has no symbols
/usr/bin/ranlib: file: obj/libjs.a(jslong.o) has no symbols
ranlib obj/libjs.a
ranlib: file: obj/libjs.a(jslock.o) has no symbols
ranlib: file: obj/libjs.a(jslong.o) has no symbols
g++ -dynamiclib  -framework System -o obj/libjs.dylib ./obj/jsapi.o ./obj/jsarena.o ./obj/jsarray.o ./obj/jsatom.o ./obj/jsbool.o ./obj/jscntxt.o ./obj/jsdate.o ./obj/jsdbgapi.o ./obj/jsdhash.o ./obj/jsdtoa.o ./obj/jsemit.o ./obj/jsexn.o ./obj/jsfun.o ./obj/jsgc.o ./obj/jshash.o ./obj/jsinterp.o ./obj/jsinvoke.o ./obj/jsiter.o ./obj/jslock.o ./obj/jslog2.o ./obj/jslong.o ./obj/jsmath.o ./obj/jsnum.o ./obj/jsobj.o ./obj/json.o ./obj/jsopcode.o ./obj/jsparse.o ./obj/jsprf.o ./obj/jsregexp.o ./obj/jsscan.o ./obj/jsscope.o ./obj/jsscript.o ./obj/jsstr.o ./obj/jsutil.o ./obj/jsxdrapi.o ./obj/jsxml.o ./obj/prmjtime.o    
g++ -o obj/js.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti -Wstrict-aliasing=2 js.cpp
g++ -o obj/js -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_dand -DEDITLINE -I. -I./obj  ./obj/js.o ./obj/libjs.a    \
        ./obj/editline/libedit.a
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT encoding.o -MD -MP -MF .deps/encoding.Tpo -c -o encoding.o encoding.c
mv -f .deps/encoding.Tpo .deps/encoding.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT highlight.o -MD -MP -MF .deps/highlight.Tpo -c -o highlight.o highlight.c
mv -f .deps/highlight.Tpo .deps/highlight.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT instrument.o -MD -MP -MF .deps/instrument.Tpo -c -o instrument.o instrument.c
mv -f .deps/instrument.Tpo .deps/instrument.Po
g++ -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT instrument-js.o -MD -MP -MF .deps/instrument-js.Tpo -c -o instrument-js.o instrument-js.cpp
mv -f .deps/instrument-js.Tpo .deps/instrument-js.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT jscoverage.o -MD -MP -MF .deps/jscoverage.Tpo -c -o jscoverage.o jscoverage.c
mv -f .deps/jscoverage.Tpo .deps/jscoverage.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT resource-manager.o -MD -MP -MF .deps/resource-manager.Tpo -c -o resource-manager.o resource-manager.c
mv -f .deps/resource-manager.Tpo .deps/resource-manager.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT stream.o -MD -MP -MF .deps/stream.Tpo -c -o stream.o stream.c
mv -f .deps/stream.Tpo .deps/stream.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
g++ -Ijs -Ijs/obj -DXP_UNIX -g -O2   -o jscoverage encoding.o highlight.o instrument.o instrument-js.o jscoverage.o resource-manager.o stream.o util.o  js/obj/libjs.a -lm -liconv  
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-connection.o -MD -MP -MF .deps/http-connection.Tpo -c -o http-connection.o http-connection.c
mv -f .deps/http-connection.Tpo .deps/http-connection.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-exchange.o -MD -MP -MF .deps/http-exchange.Tpo -c -o http-exchange.o http-exchange.c
mv -f .deps/http-exchange.Tpo .deps/http-exchange.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-host.o -MD -MP -MF .deps/http-host.Tpo -c -o http-host.o http-host.c
mv -f .deps/http-host.Tpo .deps/http-host.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-message.o -MD -MP -MF .deps/http-message.Tpo -c -o http-message.o http-message.c
http-message.c: In function ‘HTTPMessage_set_content_length’:
http-message.c:280: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
mv -f .deps/http-message.Tpo .deps/http-message.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-server.o -MD -MP -MF .deps/http-server.Tpo -c -o http-server.o http-server.c
http-server.c: In function ‘HTTPServer_run’:
http-server.c:184: warning: passing argument 3 of ‘accept’ from incompatible pointer type
mv -f .deps/http-server.Tpo .deps/http-server.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT http-url.o -MD -MP -MF .deps/http-url.Tpo -c -o http-url.o http-url.c
mv -f .deps/http-url.Tpo .deps/http-url.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -Ijs -Ijs/obj -DXP_UNIX -g -O2 -MT jscoverage-server.o -MD -MP -MF .deps/jscoverage-server.Tpo -c -o jscoverage-server.o jscoverage-server.c
mv -f .deps/jscoverage-server.Tpo .deps/jscoverage-server.Po
g++ -Ijs -Ijs/obj -DXP_UNIX -g -O2   -o jscoverage-server http-connection.o http-exchange.o http-host.o http-message.o http-server.o http-url.o encoding.o highlight.o instrument-js.o jscoverage-server.o resource-manager.o stream.o util.o  js/obj/libjs.a -lm  -lpthread -liconv  
npm info install [email protected]
npm info postinstall [email protected]
npm info preactivate [email protected]
npm info activate [email protected]
npm info postactivate [email protected]
npm info build Success: [email protected]
npm ok
macn-dand:~ $ 

process exit helper

something like:

test: function(assert, exit) {
    var called;
    setTimeout(function(){ called = true; });
    exit(function(){
      assert.ok(called);
    });
}

autogenerated code of express.js throws a exception

sebs@ubuntu:~$ express foo && cd foo && expresso
create : foo create : foo/app.js create : foo/pids create : foo/logs create : foo/public/images create : foo/public/stylesheets create : foo/public/stylesheets/style.less create : foo/views/partials create : foo/views/layout.jade create : foo/views/index.jade create : foo/public/javascripts create : foo/test create : foo/test/app.test.js

uncaught: Error: ECONNREFUSED, Connection refused

at IOWatcher.callback (net:853:22)
at node.js:764:9

Version Info
Linux ubuntu 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 i686 GNU/Linux
Release: 10.04

sebs@ubuntu:~/foo/foo$ node -v
v0.2.0

sebs@ubuntu:~/foo/foo$ express -v
1.0.0rc2

sebs@ubuntu:~/foo/foo$ expresso -v
0.6.1

Remark: issue doublette to by accident closed one, "bug" still alive.

assert.response and encoding

I'm working with binary data, and it would be nice if assert.response let you specify the encoding, otherwise the results are wrong.

Problem setting body on PUT requests

I'm having trouble getting my expresso test to do a PUT request with a body. My test and route are in this gist. My application does not have any additional middlewares.

The console.log() in the route always outputs undefined. Can you spot any problems with the test or is this something expresso doesn't support yet?

Thanks!

autogenerated code of express.js throws a exception

sebs@ubuntu:~$ express foo && cd foo && expresso
create : foo
create : foo/app.js
create : foo/pids
create : foo/logs
create : foo/public/images
create : foo/public/stylesheets
create : foo/public/stylesheets/style.less
create : foo/views/partials
create : foo/views/layout.jade
create : foo/views/index.jade
create : foo/public/javascripts
create : foo/test
create : foo/test/app.test.js

uncaught: Error: ECONNREFUSED, Connection refused
at IOWatcher.callback (net:853:22)
at node.js:764:9

beforeExit callbacks are not executed when executing tests serially

$ cat test/test-foo.js
var assert = require('assert');
module.exports = {
testFoo: function(beforeExit) {
beforeExit(function() {
assert.equal(false, true);
});
}
};
$ expresso

   test-foo.js testFoo: AssertionError: true == false
    at /home/proppy/a/test/test-foo.js:5:16
    at EventEmitter.<anonymous> (/usr/local/lib/node/.npm/expresso/9999.0.0-LINK-82734bf9/package/bin/expresso:803:37)
    at EventEmitter.<anonymous> (events.js:27:15)
    at EventEmitter.emit (/usr/local/lib/node/.npm/expresso/9999.0.0-LINK-82734bf9/package/bin/expresso:880:10)
    at report (/usr/local/lib/node/.npm/expresso/9999.0.0-LINK-82734bf9/package/bin/expresso:826:13)
    at EventEmitter.emit (/usr/local/lib/node/.npm/expresso/9999.0.0-LINK-82734bf9/package/bin/expresso:877:9)


   Failures: 1


$ expresso -s
.

   100% 1 tests

Better reporting

nicer looking display, and make sure exit status is > 0 when failures are present.
remove failures / passes from messages .. irrelevant with async in most cases

Testing express server with session causes test to hang

Trying to test my app with sessions active.

This is fine

var app = express.createServer();
app.use(express.cookieDecoder());
app.get('/', function(req, res){
    res.writeHead(200, {});
    res.end('wahoo');
});
assert.response(app, { url: '/' }, { body: 'wahoo' });

But this hangs

var app = express.createServer();
app.use(express.cookieDecoder());
app.use(express.session());
app.get('/', function(req, res){
    res.writeHead(200, {});
    res.end('wahoo');
});

assert.response(app, { url: '/' }, { body: 'wahoo' });

Thanks, Mike

Cannot run expresso after installing via npm on OSX 10.6.4

After installing expresso via npm I tried running expresso and got:

~$ expresso
module:252
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module '/Users/michael/.node_libraries/.npm/expresso/0.5.0/package/bin/expresso'
at loadModule (module:252:15)
at require (module:378:12)
at Object. (/usr/local/bin/expresso:5:18)
at Module._compile (module:427:23)
at Module._loadScriptSync (module:437:8)
at Module.loadSync (module:310:10)
at Object.runMain (module:491:22)
at node.js:253:10

I'm on node 0.1.100

make hangs

I've cloned the repo locally and run make but it just hangs. When I ctrl-c it I get this output

$ make
^C
http.test.js test assert.response(): AssertionError: 0 == 2
at /Users/robbieclutton/dev/express-apps/expresso/test/http.test.js:73:20
at EventEmitter. (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:743:37)
at EventEmitter. (events:26:26)
at EventEmitter.emit (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:815:10)
at report (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:764:13)
at EventEmitter.emit (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:812:9)
at EventEmitter.exit (node.js:237:11)
at EventEmitter. (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:801:17)
at EventEmitter. (events:26:26)
at EventEmitter.emit (/Users/robbieclutton/dev/express-apps/expresso/bin/expresso:815:10)

Failures: 1

make: *** [test] Error 1

Command line helper for test file generation

A little helper that generates the boilerplate needed for a test would be a nice thing. It would help us lazy people to write smaller files with less tests, but more of them.

Thanks

don't get to see thrown exception

If my code throws an exception, I see the following:

/usr/local/bin/expresso:302
                msg = err.stack.replace(msg, colorize('[red]{' + err + '}'));
                                ^
TypeError: Cannot call method 'replace' of undefined

which is not especially useful ?

problem with serial option with > 1 assert.response

The following works fine on 0.7.0, but only runs the first test properly in 0.7.2:

var server = require("../server"),
    assert = require("assert")

exports.test_root = function(done) {
  assert.response(server, { url: '/' }, { 
    status: 200, 
    body: /Welcome/
  }, 
  function() {
    done()
  })
}
exports.test_root2 = function(done) {
  assert.response(server, { url: '/' }, { 
    status: 200, 
    body: /Welcome/
  },  function() {
    done()
  })
}

site

we need a site :D

Installing via npm tries to install to /usr/local/bin even tho node, npm and all other node related libraries are in ~/.local/

g++ -Ijs -Ijs/obj -DXP_UNIX -g -O2 -o jscoverage-server http-connection.o http-exchange.o http-host.o http-message.o http-server.o http-url.o encoding.o highlight.o instrument-js.o jscoverage-server.o resource-manager.o stream.o util.o js/obj/libjs.a -lm -lpthread
make[3]: Leaving directory /home/lakin/.local/lib/node/.npm/expresso/0.6.1/package/deps/jscoverage' make[2]: Leaving directory/home/lakin/.local/lib/node/.npm/expresso/0.6.1/package/deps/jscoverage'
make[1]: Leaving directory /home/lakin/.local/lib/node/.npm/expresso/0.6.1/package/deps/jscoverage' install deps/jscoverage/node-jscoverage /usr/local/bin install: cannot create regular file/usr/local/bin/node-jscoverage': Permission denied
make: *** [install-jscov] Error 1
npm info expresso-0.6.1 Failed to exec install script
npm ERR! install failed Error: expresso-0.6.1 install: make install-jscov
npm ERR! install failed sh failed with 2
npm ERR! install failed at ChildProcess. (/home/lakin/.local/lib/node/.npm/npm/0.1.27-12/package/lib/utils/exec.js:24:18)
npm ERR! install failed at ChildProcess.emit (events:33:26)
npm ERR! install failed at ChildProcess.onexit (child_process:151:12)
npm ERR! install failed at node.js:775:9
npm info install failed rollback
npm info not installed expresso,0.6.1
npm info install failed rolled back
npm ERR! Error: expresso-0.6.1 install: make install-jscov
npm ERR! sh failed with 2
npm ERR! at ChildProcess. (/home/lakin/.local/lib/node/.npm/npm/0.1.27-12/package/lib/utils/exec.js:24:18)
npm ERR! at ChildProcess.emit (events:33:26)
npm ERR! at ChildProcess.onexit (child_process:151:12)
npm ERR! at node.js:775:9
npm ERR! try running: 'npm help install'
npm ERR! Report this entire log at http://github.com/isaacs/npm/issues
npm ERR! or email it to [email protected]
npm not ok

It should install with ~/.local as the prefix so that bin should end up in ~/.local/bin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.