UNPKG

@spearwolf/twopoint5d

Version:

a library to create 2.5d realtime graphics and pixelart with three.js

18 lines 653 B
import { describe, expect, it } from 'vitest'; import { isPowerOf2 } from './isPowerOf2.js'; describe('isPowerOf2', () => { it('power of 2 value', () => { expect(isPowerOf2(1)).toBe(true); expect(isPowerOf2(2)).toBe(true); expect(isPowerOf2(4)).toBe(true); expect(isPowerOf2(512)).toBe(true); expect(isPowerOf2(4096)).toBe(true); }); it('not power of 2 value', () => { expect(isPowerOf2(0)).toBe(false); expect(isPowerOf2(63)).toBe(false); expect(isPowerOf2(11)).toBe(false); expect(isPowerOf2(2047)).toBe(false); }); }); //# sourceMappingURL=isPowerOf2.spec.js.map