hugs / angelo Goto Github PK
View Code? Open in Web Editor NEWA (rerunnable) Mocha test runner
License: MIT License
A (rerunnable) Mocha test runner
License: MIT License
Results are currently presented in total milliseconds.
Summary:
1 pass
0 failures
--------------------------
1 test (210794ms)
"210794ms" is not exactly user-friendly. No one thinks in "ms". Instead, time results should be presented in minutes and seconds.
Summary:
1 pass
0 failures
--------------------------
1 test (3 minutes, 30 seconds)
TODO: Use the timespan library to convert milliseconds to a human readable format. Code example:
> var timespan = require('timespan');
> var ts = new timespan.TimeSpan(210794);
> ts.toLocaleString()
'0:0:3:30.794'
> ts.days
0
> ts.hours
0
> ts.minutes
3
> ts.seconds
30
Right now, the mocha runner child process is hard-coded to listen on port 3000. Use something like node-portfinder to find a free port and use that in Angelo's init process. Once we do that, you can create multiple Angelo objects that each have their own siloed runner. We need this to be able to run tests in parallel.
This occurs w/node 4.4, but from the message I would expect it to happen w/4.x or later.
LMDV-JEFFREYB:ns-api jburke$ npm install --save-dev angelo
npm WARN engine [email protected]: wanted: {"node":"0.8","npm":"1"} (current: {"node":"4.3.0","npm":"2.14.20"})
> [email protected] install /Users/jburke/Documents/Src/ns/ns-api/node_modules/angelo/node_modules/teddybear
> node-gyp rebuild
CXX(target) Release/obj.target/teddybear/teddybear.o
../teddybear.cc:13:31: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Teddybear(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../teddybear.cc:14:15: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:885:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../teddybear.cc:18:26: error: type 'const v8::internal::Arguments' does not provide a subscript operator
uint32_t inputms = args[0]->Uint32Value();
~~~~^~
../teddybear.cc:50:25: error: no member named 'New' in 'v8::String'; did you mean 'v8::TypeSwitch::New'?
Local<String> msg = String::New("teddybear failed");
^~~~~~~~~~~
v8::TypeSwitch::New
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:4705:28: note: 'v8::TypeSwitch::New' declared here
static Local<TypeSwitch> New(Local<FunctionTemplate> type);
^
../teddybear.cc:50:37: error: calling a private constructor of class 'v8::Local<v8::FunctionTemplate>'
Local<String> msg = String::New("teddybear failed");
^
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:326:13: note: declared private here
V8_INLINE Local(S* that)
^
../teddybear.cc:51:12: error: use of undeclared identifier 'ThrowException'; did you mean 'ErrnoException'?
return ThrowException(Exception::Error(msg));
^~~~~~~~~~~~~~
ErrnoException
/Users/jburke/.node-gyp/4.4.0/include/node/node.h:82:34: note: 'ErrnoException' declared here
NODE_EXTERN v8::Local<v8::Value> ErrnoException(v8::Isolate* isolate,
^
../teddybear.cc:51:12: error: too few arguments to function call, expected at least 2, have 1; did you mean '::ErrnoException'?
return ThrowException(Exception::Error(msg));
^~~~~~~~~~~~~~
::ErrnoException
/Users/jburke/.node-gyp/4.4.0/include/node/node.h:82:34: note: '::ErrnoException' declared here
NODE_EXTERN v8::Local<v8::Value> ErrnoException(v8::Isolate* isolate,
^
../teddybear.cc:55:16: error: no member named 'Close' in 'v8::HandleScope'
return scope.Close(Boolean::New(true));
~~~~~ ^
../teddybear.cc:55:39: error: too few arguments to function call, expected 2, have 1
return scope.Close(Boolean::New(true));
~~~~~~~~~~~~ ^
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:7603:1: note: 'New' declared here
Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
^
../teddybear.cc:60:15: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:885:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../teddybear.cc:64:3: error: no matching function for call to 'NODE_SET_METHOD'
NODE_SET_METHOD(target, "func", Teddybear);
^~~~~~~~~~~~~~~
/Users/jburke/.node-gyp/4.4.0/include/node/node.h:248:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/jburke/.node-gyp/4.4.0/include/node/node.h:236:13: note: candidate function [with TypeName = v8::Local<v8::Object>] not viable: no known conversion from 'Handle<v8::Value> (const v8::internal::Arguments &)' to 'v8::FunctionCallback'
(aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd argument
inline void NODE_SET_METHOD(const TypeName& recv,
^
In file included from ../teddybear.cc:2:
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:327:9: error: cannot initialize a member subobject of type 'v8::FunctionTemplate *' with an lvalue of type 'const char *'
: val_(that) {}
^ ~~~~
../teddybear.cc:50:37: note: in instantiation of function template specialization 'v8::Local<v8::FunctionTemplate>::Local<const char>' requested here
Local<String> msg = String::New("teddybear failed");
^
In file included from ../teddybear.cc:2:
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:221:5: error: assigning to 'v8::String *volatile' from incompatible type 'v8::TypeSwitch *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jburke/.node-gyp/4.4.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../teddybear.cc:50:25: note: in instantiation of function template specialization 'v8::Local<v8::String>::Local<v8::TypeSwitch>' requested here
Local<String> msg = String::New("teddybear failed");
^
13 errors generated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.