Skip to content

Commit

Permalink
Aggregate Test Cases
Browse files Browse the repository at this point in the history
Test cases for #80 on #79
  • Loading branch information
gerneio authored Jan 12, 2019
1 parent 2f45ea4 commit 764190c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/immediate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ describe('Immediate Execution -', function () {
it('Aggregate() - Transform', function () {
assert.equal(1814400, Linq.From(simpleArray).Aggregate(1, (a, b) => a * b, o => o / 2));
});

it('Aggregate() - Default Value [String]', function () {
assert.equal("123", Linq.From([1, 2, 3]).Aggregate("", (c, n) => c.toString() + n.toString()));
});

it('Aggregate() - Default Value [Number]', function () {
assert.equal("0123", Linq.From(["1", "2", "3"]).Aggregate(0, (c, n) => c.toString() + n.toString()));
});



Expand Down

0 comments on commit 764190c

Please sign in to comment.