Skip to content

Instantly share code, notes, and snippets.

@djbender
Last active October 5, 2015 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djbender/624cc69eeec9836c6dea to your computer and use it in GitHub Desktop.
Save djbender/624cc69eeec9836c6dea to your computer and use it in GitHub Desktop.
How do we even node?
# How do we even node?
A story of us trying to node:
1. Use node's debugger to interact with a test spec running under jasmine-node
$ node debug /Users/username/.nvm/versions/node/v4.1.1/lib/node_modules/jasmine-node/lib/jasmine-node/cli.js hamming_test.spec.js
Note: debugger is in hamming.js but debugger could also be in cli.js,
hamming_test.spec.js, or any other file that is loaded.
2. in the debugger we can use javascript and we can use node specific debug
commands. but at this step can't interact with the code at the breakpoint
as loaded. for instance the variable differences should be defined but when
evaluated it returns `ReferenceError: differences is not defined\n at repl:1:1`.
3. when we type in the `repl` command, we can then interact with code at the
breakpoint as loaded.
this doesn't meet our expectations because we would expect the repl behavior
to exist at step 2.
is this expectation wrong or is this just how you node?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment