UNPKG

voluptasquisquam

Version:

Image processing and manipulation in JavaScript

20 lines (15 loc) 513 B
import {Image} from 'test/common'; import 'should'; describe('check moment', function () { it('should yield the correct moment', function () { const image = new Image(8, 2, [ 0b10000011, 0b10000000, ], {kind: 'BINARY'}); image.getMoment().should.equal(4); image.getMoment(0, 0).should.equal(4); image.getMoment(1, 0).should.equal(13); image.getMoment(0, 1).should.equal(1); image.getMoment(1, 1).should.equal(0); }); });