UNPKG

voluptasquisquam

Version:

Image processing and manipulation in JavaScript

31 lines (23 loc) 606 B
import {Image} from 'test/common'; import 'should'; describe('check hypotenuse', function () { it('should yield the correct array', function () { let image1 = new Image(5, 1, [ 3, 5, 8, 7, 9 ], {kind: 'GREY'} ); let image2 = new Image(5, 1, [ 4, 12, 15, 24, 40 ], {kind: 'GREY'} ); let theoretical = [ 5, 13, 17, 25, 41 ]; Array.from(image1.hypotenuse(image2).data).should.eql(theoretical); }); });