Skip to content

Instantly share code, notes, and snippets.

@lorenzoongithub
Created July 18, 2015 11: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 lorenzoongithub/933277296df75a382a16 to your computer and use it in GitHub Desktop.
Save lorenzoongithub/933277296df75a382a16 to your computer and use it in GitHub Desktop.
//
// A minimal test
// for https://lodash.com
//
load('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.0/lodash.min.js');
x = _.last([1,2,3])
if (x !==3 ) throw '';
x = _.assign({ 'a': 1 }, { 'b': 2 }, { 'c': 3 });
if (x == undefined) throw '';
if (x.a != 1) throw '';
if (x.b != 2) throw '';
if (x.c != 3) throw '';
x = _.map([1, 2, 3], function(n) { return n * 3; });
if (x == undefined) throw '';
if (x.length !== 3) throw '';
if (x[0] != 3) throw '';
if (x[1] != 6) throw '';
if (x[2] != 9) throw '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment