GithubHelp home page GithubHelp logo

othiym23 / bug-clinic Goto Github PK

View Code? Open in Web Editor NEW
175.0 175.0 49.0 148 KB

a nodeschool.io-style workshopper for learning how to debug Node.js apps

Home Page: https://npmjs.org/package/bug-clinic

License: BSD 2-Clause "Simplified" License

JavaScript 100.00%

bug-clinic's People

Contributors

alexkval avatar darzu avatar ferhatelmas avatar gkatsev avatar julianduque avatar mdda avatar nanek avatar othiym23 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

bug-clinic's Issues

Windows 8.1 fails install.

attempted to install this via

npm --global install bug-clinic

and install results looked good except for

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. C:\Users\MYUSERNAME\AppData\Roaming\npm\node_modules\bug-clinic\node_modules\bunyan\node_modules\dtrace-provider
build\DTraceProviderStub.vcxproj]

I tried anyways to run

bug-clinic

and the response was:

C:> bug-clinic run

C:\Users\MYUSERNAME\AppData\Roaming\npm\node_modules\bug-clinic\node_modules\mkdirp\index.js:89
throw err0;
^
RangeError: Maximum call stack size exceeded

If anyone could help me figure out if i need to install some dependency or something, I would be very appreciative. I am really interested in this as I am new to js (background is in python, powershell, C#) and im really looking forward to upping my debug skills.

Errors installing bug-clinic

I get this output when trying to install on node v4.2.5

Philips-MacBook-Pro-2:tutorials Phil$ npm install -g bug-clinic
npm WARN deprecated [email protected]: use cross-spawn or cross-spawn-async instead.
WARN engine [email protected]: wanted: {"node":"<0.11.7"} (current: {"node":"4.2.5","npm":"2.14.12"})
npm WARN deprecated [email protected]: Please update to the latest object-keys
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

[email protected] install /usr/local/lib/node_modules/bug-clinic/node_modules/bunyan/node_modules/dtrace-provider
node-gyp rebuild

ACTION binding_gyp_libusdt_target_build_libusdt .
Building libusdt for x86_64
rm -f .gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -arch x86_64 -c -o usdt.o usdt.c
usdt.c:212:9: warning: implicit declaration of function 'usdt_dof_section_free' is invalid in C99
[-Wimplicit-function-declaration]
usdt_dof_section_free(&strtab);
^
usdt.c:238:9: warning: implicit declaration of function 'usdt_dof_file_free' is invalid in C99
[-Wimplicit-function-declaration]
usdt_dof_file_free(provider->file);
^
2 warnings generated.
gcc -O2 -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
TOUCH Release/obj.target/libusdt.stamp
CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_provider.o
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:69:44: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value New(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:70:45: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value Fire(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:87:44: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value New(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:88:49: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value AddProbe(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:89:52: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value RemoveProbe(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:90:47: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value Enable(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:91:48: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value Disable(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../dtrace_provider.cc:1:
../dtrace_provider.h:92:45: error: no type named 'Arguments' in namespace 'v8'; did you mean
'v8::internal::Arguments'?
static v8::Handlev8::Value Fire(const v8::Arguments& args);
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../dtrace_provider.cc:23:17: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:885:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../dtrace_provider.cc:25:55: error: cannot initialize a parameter of type 'v8::Isolate *' with an
lvalue of type 'v8::Handlev8::Value (const v8::internal::Arguments &)' (aka
'v8::Localv8::Value (const v8::internal::Arguments &)')
Local t = FunctionTemplate::New(DTraceProvider::New);
^~~~~~~~~~~~~~~~~~~
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:4350:16: note: passing argument to parameter 'isolate'
here
Isolate
isolate, FunctionCallback callback = 0,
^
../dtrace_provider.cc:26:58: error: 'New' is a private member of
'v8::PersistentBasev8::FunctionTemplate'
constructor_template = Persistent::New(t);
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:639:23: note: declared private here
V8_INLINE static T* New(Isolate* isolate, T* that);
^
../dtrace_provider.cc:26:28: error: too few arguments to function call, expected 2, have 1; did you
mean 'DTraceProbe::New'?
constructor_template = Persistent::New(t);
^~~~~~~~~~
DTraceProbe::New
../dtrace_provider.h:69:34: note: 'DTraceProbe::New' declared here
static v8::Handlev8::Value New(const v8::Arguments& args);
^
../dtrace_provider.cc:27:25: error: member reference type 'Persistentv8::FunctionTemplate' is not a
pointer; did you mean to use '.'?
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~^~
.
../dtrace_provider.cc:27:27: error: no member named 'InstanceTemplate' in
'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraitsv8::FunctionTemplate >'
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~ ^
../dtrace_provider.cc:28:25: error: member reference type 'Persistentv8::FunctionTemplate' is not a
pointer; did you mean to use '.'?
constructor_template->SetClassName(String::NewSymbol("DTraceProvider"));
~~~~~~~~~~~~~~~~~~~~^~
.
../dtrace_provider.cc:28:27: error: no member named 'SetClassName' in
'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraitsv8::FunctionTemplate >'
constructor_template->SetClassName(String::NewSymbol("DTraceProvider"));
~~~~~~~~~~~~~~~~~~~~ ^
../dtrace_provider.cc:28:48: error: no member named 'NewSymbol' in 'v8::String'
constructor_template->SetClassName(String::NewSymbol("DTraceProvider"));
~~~~~~~~^
../dtrace_provider.cc:30:31: error: no viable conversion from 'Persistentv8::FunctionTemplate' to
'v8::Localv8::FunctionTemplate'
NODE_SET_PROTOTYPE_METHOD(constructor_template, "addProbe", DTraceProvider::AddProbe);
^~~~~~~~~~~~~~~~~~~~
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:210:7: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from
'Persistentv8::FunctionTemplate' to 'const v8::Localv8::FunctionTemplate &' for 1st
argument
class Local {
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:210:7: note: candidate constructor
(the implicit move constructor) not viable: no known conversion from
'Persistentv8::FunctionTemplate' to 'v8::Localv8::FunctionTemplate &&' for 1st argument
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:214:13: note: candidate template ignored: could not
match 'Local' against 'Persistent'
V8_INLINE Local(Local that)
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:326:13: note: candidate template ignored: could not
match 'S ' against 'Persistentv8::FunctionTemplate'
V8_INLINE Local(S
that)
^
/Users/Phil/.node-gyp/4.2.5/include/node/node.h:252:71: note: passing argument to parameter 'recv'
here
inline void NODE_SET_PROTOTYPE_METHOD(v8::Localv8::FunctionTemplate recv,
^
../dtrace_provider.cc:31:31: error: no viable conversion from 'Persistentv8::FunctionTemplate' to
'v8::Localv8::FunctionTemplate'
NODE_SET_PROTOTYPE_METHOD(constructor_template, "removeProbe", DTraceProvider::RemoveProbe);
^~~~~~~~~~~~~~~~~~~~
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:210:7: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from
'Persistentv8::FunctionTemplate' to 'const v8::Localv8::FunctionTemplate &' for 1st
argument
class Local {
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:210:7: note: candidate constructor
(the implicit move constructor) not viable: no known conversion from
'Persistentv8::FunctionTemplate' to 'v8::Localv8::FunctionTemplate &&' for 1st argument
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:214:13: note: candidate template ignored: could not
match 'Local' against 'Persistent'
V8_INLINE Local(Local that)
^
/Users/Phil/.node-gyp/4.2.5/include/node/v8.h:326:13: note: candidate template ignored: could not
match 'S ' against 'Persistentv8::FunctionTemplate'
V8_INLINE Local(S
that)
^
/Users/Phil/.node-gyp/4.2.5/include/node/node.h:252:71: note: passing argument to parameter 'recv'
here
inline void NODE_SET_PROTOTYPE_METHOD(v8::Localv8::FunctionTemplate recv,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/DTraceProviderBindings/dtrace_provider.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/bug-clinic/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v4.2.5
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing [email protected]
/usr/local/bin/bug-clinic -> /usr/local/lib/node_modules/bug-clinic/bin/cmd.js
[email protected] /usr/local/lib/node_modules/bug-clinic
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])
Philips-MacBook-Pro-2:tutorials Phil$ node --v
node: bad option: --v
Philips-MacBook-Pro-2:tutorials Phil$ node -v
v4.2.5
Philips-MacBook-Pro-2:tutorials Phil$

Probe doesn't seem to run on Windows

Copying the solution from the package folder gives:

$ bug-clinic run 8.js

TAP version 13
# (anonymous)
not ok 1 tracer exited OK
  ---
    operator: equal
    expected: 0
    actual:   8
  ...
not ok 2 got expected first path
  ---
    operator: equal
    expected: '/neato'
    actual:   ''
  ...
not ok 3 got expected second path
  ---
    operator: equal
    expected: '/prognosis'
    actual:   undefined
  ...
not ok 4 got expected third path
  ---
    operator: equal
    expected: '/whoops'
    actual:   undefined
  ...
not ok 5 got expected first status code
  ---
    operator: equal
    expected: '404'
    actual:   '\r'
  ...
not ok 6 got expected second status code
  ---
    operator: equal
    expected:
      '200'
    actual:
      '.....\\node_modules\\bug-clinic\\node_modules\\.bin\\jstrace:2\r'
  ...
not ok 7 got expected third status code
  ---
    operator: equal
    expected: '404'
    actual:   'basedir=`dirname "$0"`\r'
  ...
not ok 8 plan != count
  ---
    operator: fail
    expected: 13
    actual:   7
  ...

1..8
# tests 8
# pass  0
# fail  8

Domain Node module is deprecated

Students are using 8.10.0 at Nodeschool Baltimore and they are unable to finish due to the Traces exercise use of deprecated Node module domain. Some of our students are required to use the LTS version so a upgrade is needed badly.

blink blink ;)

Thanks for the workshop, but when I run the scripts the blinking results distract a lot! no offense ;)

Test challenge fails

Regardless of whether I fix the isGreaterThanZero function, I see this weird error.

TAP version 13
# (anonymous)
not ok 1 TypeError: t.ok is not a function
  ---
    operator: error
    expected: undefined
    actual:   [TypeError: t.ok is not a function]
    stack:
      TypeError: t.ok is not a function
        at scenario (/Users/sasha/Projects/nodeschool/bug-clinic/tape.js:4:5)
        at Domain.<anonymous> (/usr/local/lib/node_modules/bug-clinic/problems/stacktraces/index.js:31:9)
        at Domain.run (domain.js:221:14)
        at verify (/usr/local/lib/node_modules/bug-clinic/problems/stacktraces/index.js:30:11)
        at Test.<anonymous> (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/index.js:48:40)
        at Test.bound [as _cb] (/usr/local/lib/node_modules/bug-clinic/node_modules/tape/lib/test.js:60:32)
        at Test.run (/usr/local/lib/node_modules/bug-clinic/node_modules/tape/lib/test.js:74:14)
        at Test.bound [as run] (/usr/local/lib/node_modules/bug-clinic/node_modules/tape/lib/test.js:60:32)
        at Immediate.next (/usr/local/lib/node_modules/bug-clinic/node_modules/tape/lib/results.js:66:15)
        at runCallback (timers.js:672:20)
  ...

1..1
# tests 1
# pass  0
# fail  1

Problem with stacktrace

I downloaded the solution.js from problems/stacktraces. But when I try the

bug-clinic run solution.js

I get the following error:

TAP version 13
# (anonymous)
ok 1 loaded scenario OK
not ok 2 TypeError: path must be a string
  ---
    operator: error
    expected: undefined
    actual:   [TypeError: path must be a string]
    stack:
      TypeError: path must be a string
        at TypeError (native)
        at Object.fs.open (fs.js:491:11)
        at Object.open (/Users/sajt/Sites/ember/js/node_modules/stackup/node_modules/async-listener/index.js:18:15)
        at fs.readFile (fs.js:262:6)
        at /Users/sajt/Sites/ember/js/node_modules/stackup/node_modules/async-listener/index.js:18:15
        at Domain.<anonymous> (/Users/sajt/Sites/ember/js/solution.js:14:5)
        at Domain.run (domain.js:197:16)
        at scenario (/Users/sajt/Sites/ember/js/solution.js:13:5)
        at verify (/usr/local/lib/node_modules/bug-clinic/problems/bunyan/index.js:28:9)
        at Test.<anonymous> (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/index.js:48:40)
        at Test.bound [as _cb] (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/node_modules/tape/lib/test.js:60:32)
        at Test.run (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/node_modules/tape/lib/test.js:74:14)
        at Test.bound [as run] (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/node_modules/tape/lib/test.js:60:32)
        at Immediate.next [as _onImmediate] (/usr/local/lib/node_modules/bug-clinic/node_modules/adventure-verify/node_modules/tape/lib/results.js:66:15)
        at processImmediate [as _immediateCallback] (timers.js:367:17)
  ...

1..2
# tests 2
# pass  1
# fail  1

Why is it?

Bugclinic scan challenge - wrong problem test ?

I'm doing bugclinic challanges, but I couldn't find any errors in scan exercice.
The proposed server and client files pass verify with no errors.
Although I have understood the concept of NODE_DEBUG I tought maybe I'm missing something here.

Is this a bug or I'm really missing something ?

stacktraces test 3 does not pass

Hello, when I try to do:
bug-clinic run scenario.js
I got:

TAP version 13
# (anonymous)
ok 1 got error
ok 2 found previous stack
not ok 3 found current stack
  ---
    operator: ok
    expected: true
    actual:   null
    at: Domain.<anonymous> (/Users/adam/homebrew/lib/node_modules/bug-clinic/problems/stacktraces/index.js:36:13)
  ...

1..3
# tests 3
# pass  2
# fail  1

I use (uname -a): Darwin AdamMac.local 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64.

Sorry about the output, I do not know how to disable markdown here.

Completion of tutorial

In the README it states "please note this is only about 2/3 complete". However the last commit was on Nov 1, 2014. Is there more work planned, or is the tutorial complete?

Running scan/node-debug step freezes on windows

Console output:

bug-clinic run scan.js

TAP version 13
listening
HTTP: SERVER new http connection
HTTP: outgoing message end.
HTTP: server socket close
# (anonymous)
ok 1 exited without errors
ok 2 got expected response from server
*[this is where it gets stuck]*

scan.js:

 var request = require("http").request;

 var contentType = "text/html";
 var body = "<html>" +
            "<head><title>hi</title></head>" +
            "<body><p>yo</p></body>" +
            "</html>";

 var headers = {
   host : "localhost",
   port : 9876,
   method : "GET",
   headers : {
     "content-type"   : contentType,
     //"content-length" : body.length,
     "requested-by"   : "Request"
   }
 };

 var yolo = request(headers, function (res) {
   res.setEncoding("utf8");

   res.on("data", function (data) {
     console.log("BODY: " + data);
   });

   res.on("end", function () {
     console.error("done!");
   });
 });

yolo.end();

Neither does Observe

See #14. Here's the output of the correct solution:

TAP version 13
# (anonymous)
ok 1 loaded scenario OK
ok 2 test bootstrapper was passed a server
ok 3 test bootstrapper was passed a REPL
not ok 4 REPL client ran without error
  ---
    operator: equal
    expected: 0
    actual:   8
  ...
not ok 5 got expected value from REPL client
  ---
    operator: ok
    expected: true
    actual:   null
  ...
not ok 6 got no error output from REPL client
  ---
    operator: notOk
    expected:
      false
    actual:
      '\r\nc:\......\\node_modules\\bug-clinic\\node_modules\\.bin\\rc:2\r\nbasedir=`dirname "$0"`\r\n        ^\r\nSyntaxError: Unexpected token ILLEGAL\r\n
   at Module._compile (module.js:439:25)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:312:12)\r\n    at Function.Module.runMain (module.js:497:10)\r\n    at startup (node.js:119:16)\r\n    at node.js:929:3\r\n'
  ...

1..6
# tests 6
# pass  3
# fail  3

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.