Skip to content

Instantly share code, notes, and snippets.

@LottieVixen
Created October 28, 2016 13:26
Show Gist options
  • Select an option

  • Save LottieVixen/3b85dd49ed2e0647294b7e06b7360886 to your computer and use it in GitHub Desktop.

Select an option

Save LottieVixen/3b85dd49ed2e0647294b7e06b7360886 to your computer and use it in GitHub Desktop.
/*
###--- test-anything #2 ---###
# Tell me what's wrong
Write a passing assertion for the function isCoolNumber, that will assure that
it returns true when passing 42 in it.
The path of the module exporting the function will be provided through
process.argv[2].
*/
var assert = require('assert');
var isCoolNumber = function(number){
assert.equal(process.argv[2],42, return true);
return false;
}
isCoolNumber(process.argv[2]);
//Also tried
var assert = require('assert');
assert.equal(process.argv[2],42,true);
//both failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment