mirror_novnc/tests/test.int.js
Pierre Ossman 1b2fe3321b Manually load sinon and chai
karma-sinon-chai is not compatible with Chai 5+, and Karma is no longer
being updated.

Load sinon and chai manually instead, until we can have a long term plan
in place.
2024-08-05 15:49:39 +02:00

14 lines
426 B
JavaScript

import { toUnsigned32bit, toSigned32bit } from '../core/util/int.js';
describe('Integer casting', function () {
it('should cast unsigned to signed', function () {
let expected = 4294967286;
expect(toUnsigned32bit(-10)).to.equal(expected);
});
it('should cast signed to unsigned', function () {
let expected = -10;
expect(toSigned32bit(4294967286)).to.equal(expected);
});
});