flecks/packages/server/test/runtime-connect.js
2024-02-14 20:16:31 -06:00

17 lines
380 B
JavaScript

import {processCode} from '@flecks/core/src/server';
import {expect} from 'chai';
import {withServer} from './helpers/with-server';
it('connects', withServer(
async ({server}) => {
const code = processCode(server.child);
await server.actions([
{type: 'exit', payload: 42},
]);
expect(await code)
.to.equal(42);
},
{failOnErrorCode: false},
));