Skip to content

Instantly share code, notes, and snippets.

@rickywid
Created October 4, 2016 19:22
Show Gist options
  • Save rickywid/dfbb4bdf0294b4d26c8857f0377c96ee to your computer and use it in GitHub Desktop.
Save rickywid/dfbb4bdf0294b4d26c8857f0377c96ee to your computer and use it in GitHub Desktop.
describe("Example tests", function(){
var testData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -11, -12, -13, -14, -15];
var actual = countPositivesSumNegatives(testData);
var expected = [10, -65];
Test.expect(actual[0] == expected[0] && actual[1] == expected[1], "Wrong return value.");
testData = [0, 2, 3, 0, 5, 6, 7, 8, 9, 10, -11, -12, -13, -14];
actual = countPositivesSumNegatives(testData);
expected = [8, -50];
Test.expect(actual[0] == expected[0] && actual[1] == expected[1], "Wrong return value.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment