Skip to content

Instantly share code, notes, and snippets.

@peterblazejewicz
Created November 23, 2014 20:03
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 peterblazejewicz/7e96aadf78f1ac47787d to your computer and use it in GitHub Desktop.
Save peterblazejewicz/7e96aadf78f1ac47787d to your computer and use it in GitHub Desktop.
/Users/piotrblazejewicz/git/jsbin npm test
npm test
> jsbin@3.23.8 test /Users/piotrblazejewicz/git/jsbin
> node_modules/mocha/bin/_mocha -t 25000 --ui bdd test/**/*.test.js
Gruntfile
/Users/piotrblazejewicz/git/jsbin/Gruntfile.js
{ stdout: '\u001b[4mRunning "concat:dist" (concat) task\u001b[24m\nFile "public/js/prod/jsbin-3.23.8.js" created.\n\n\u001b[4mRunning "concat:runner" (concat) task\u001b[24m\nFile "public/js/prod/runner-3.23.8.js" created.\n\n\u001b[4mRunning "uglify:dist" (uglify) task\u001b[24m\nFile "public/js/prod/jsbin-3.23.8.min.js" created.\n\n\u001b[4mRunning "uglify:runner" (uglify) task\u001b[24m\nFile "public/js/prod/runner-3.23.8.min.js" created.\n\n\u001b[4mRunning "uglify:addons" (uglify) task\u001b[24m\nFile "public/js/prod/addon-tern-3.23.8.min.js" created.\n\n\u001b[32mDone, without errors.\u001b[39m',
stderr: '',
code: 0,
toString: [Function] }
✓ should exit cleanly (8123ms)
loop
✓ should ignore comments
✓ should leave none loop code alone
✓ should rewrite for loops
✓ should handle one liner for with an inline function
✓ should rewrite one line for loops
Exiting potential infinite loop at line 1. To disable loop protection: add "// noprotect" to your code
✓ should rewrite one line while loops (101ms)
Exiting potential infinite loop at line 2. To disable loop protection: add "// noprotect" to your code
✓ should protect infinite while (102ms)
Exiting potential infinite loop at line 3. To disable loop protection: add "// noprotect" to your code
✓ should protect infinite for (101ms)
✓ should allow nested loops to run
✓ should not rewrite "do" in strings
✓ should not rewrite "do" in object properties
✓ should not rewrite "do" in comments
✓ should rewrite loops when curlies are on the next line
✓ should find one liners on multiple lines
✓ should handle brackets inside of loop conditionals
✓ should not corrupt multi-line (on more than one line) loops
✓ should ignore when loop protect is disabled
✓ should protect do loops
labels
✓ should handle continue statements and gotos
✓ should handle labels with comments
✓ should handle things that *look* like labels
22 passing (8s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment