Skip to content

Commit

Permalink
tweaked tests for better coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Suttell committed Dec 2, 2014
1 parent 6b02fdc commit a64f320
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sine-waves.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions tests/specs/SineWaves-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('sine-waves.js', function() {

it('should throw an error if no element is supplied', function (){
expect(function(){
new SineWaves({});
new SineWaves();
}).toThrow('No Canvas Selected');
});

Expand All @@ -29,7 +29,8 @@ describe('sine-waves.js', function() {
var called = false;
var waves = new SineWaves({
el: element,
waves: [{}],
width: 100,
waves: [{}, {}],
initialize: function() {
called = true;
}
Expand Down Expand Up @@ -88,6 +89,7 @@ describe('sine-waves.js', function() {
waves.updateDimensions();
expect(waves.width).toBe(100);
expect(waves.height).toBe(100);
console.log(waves.wavesWidth);
});


Expand Down Expand Up @@ -228,6 +230,7 @@ describe('sine-waves.js', function() {
height: 100,
rotate: 180
});
waves.update();
expect(waves.rotation).toBe(Math.PI);
})
});
Expand Down

0 comments on commit a64f320

Please sign in to comment.