import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; import { double, lateRegistration } from './fixtures/freeze.ts'; describe('module freezing', () => { it('throws when mo() is called after a task from that module has been dispatched', async () => { await double(2); assert.throws(lateRegistration, { message: /Cannot call mo\(\).*after a task from this module has been dispatched/, }); }); });