Created
July 18, 2015 11:15
-
-
Save lorenzoongithub/933277296df75a382a16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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