Skip to content

Commit

Permalink
Add array test to make sure it throws error
Browse files Browse the repository at this point in the history
  • Loading branch information
daern91 committed Feb 3, 2018
1 parent 57869ad commit e724336
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/buildActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ describe('#buildActions', function() {
expect(result).to.eql(expectedResult);
});

it('should return error when non-object arguments are passed', function() {
it('should return error when string arguments are passed', function() {
expect(() => buildActions('customer', 'newCustomer')).to.throw(Error);
});

it('should return error when array arguments are passed', function() {
expect(() => buildActions([], newCustomer)).to.throw(Error);
});

it('should return error when object contains non-string values', function() {
expect(() => buildActions(customer, failingCustomer)).to.throw(Error);
});
Expand Down

0 comments on commit e724336

Please sign in to comment.