Skip to content

Commit

Permalink
Add regression test for jpeg and gif formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Oct 20, 2018
1 parent 36bed61 commit 7e14f8a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,36 @@ describe('Histogram of gradient-red.png', function () {
});
});
});


describe('Histogram of cablecar.gif', function () {
var path = imagePath + 'cablecar.gif';

it('should not be greyscale', function (done) {
histogram(path, function (error, result) {
expect(error, 'to be falsy');

expect(result, 'to satisfy', {
greyscale: false
});

done();
});
});
});

describe('Histogram of turtle.jpg', function () {
var path = imagePath + 'turtle.jpg';

it('should not be greyscale', function (done) {
histogram(path, function (error, result) {
expect(error, 'to be falsy');

expect(result, 'to satisfy', {
greyscale: false
});

done();
});
});
});
Binary file added test/images/cablecar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/images/turtle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7e14f8a

Please sign in to comment.