Something went wrong. Try again.
Offload functions to worker threads with shared memory primitives for Node.js.
Something went wrong. Try again.
12345678910111213141516171819202122232425import { describe, it } from 'node:test';import assert from 'node:assert/strict';import { uint32 } from 'moroutine';
describe('Uint32', () => { it('self-allocates and initializes to zero', () => { const v = uint32(); assert.equal(v.load(), 0); });
it('stores and loads a value', () => { const v = uint32(); v.store(42); assert.equal(v.load(), 42); });
it('exposes byteSize of 4', () => { assert.equal(uint32.byteSize, 4); });
it('exposes byteAlignment of 4', () => { assert.equal(uint32.byteAlignment, 4); });});