fix: alias

This commit is contained in:
cha0s 2024-02-18 10:32:18 -06:00
parent 5ba0aa21c0
commit 460c7d61a8
11 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@ import {expect} from 'chai';
import {withServer} from './helpers/with-server';
it('allows updates to fail', withServer(async ({server, socket}) => {
expect((await socket.send({type: 'config.get', payload: 'comm.foo'})).payload)
expect((await socket.send({type: 'config.get', payload: 'server-test.foo'})).payload)
.to.equal('bar');
const hmr = socket.waitForAction('hmr');
await writeFile(
@ -15,11 +15,11 @@ it('allows updates to fail', withServer(async ({server, socket}) => {
'@flecks/build': {}
'@flecks/core': {}
'@flecks/server': {}
'comm:./comm': {foo: 'baz'}
'server-test:./server-test': {foo: 'baz'}
`,
);
await hmr;
expect((await socket.send({type: 'config.get', payload: 'comm.foo'})).payload)
expect((await socket.send({type: 'config.get', payload: 'server-test.foo'})).payload)
.to.equal('baz');
let restarted;
const whatHappened = Promise.race([
@ -41,7 +41,7 @@ it('allows updates to fail', withServer(async ({server, socket}) => {
'@flecks/build': {}
'@flecks/core': {}
'@flecks/server': {}
'comm:./comm': {foo: 'fail'}
'server-test:./server-test': {foo: 'fail'}
`,
);
await whatHappened;

View File

@ -27,7 +27,7 @@ it('restarts when config keys change', withServer(async ({server, socket}) => {
'@flecks/core': {}
'@flecks/repl': {}
'@flecks/server': {}
'comm:./comm': {}
'server-test:./server-test': {}
`,
);
await whatHappened;

View File

@ -15,7 +15,7 @@ it('updates config', withServer(async ({server, socket}) => {
'@flecks/build': {}
'@flecks/core': {id: 'testing'}
'@flecks/server': {}
'comm:./comm': {}
'server-test:./server-test': {}
`,
);
await hmr;

View File

@ -37,7 +37,7 @@ it('propagates bootstrap config', withServer(
'@flecks/build': {}
'@flecks/core': {}
'@flecks/server': {}
'comm:./comm': {}
'server-test:./server-test': {}
'server-only:./server-only': {foo: 'baz'}
`,
);

View File

@ -9,7 +9,7 @@ it('propagates override config', withServer(
async ({server}) => {
const [{payload: id}, {payload: foo}] = await server.actions([
{type: 'config.get', payload: '@flecks/core.id'},
{type: 'config.get', payload: 'comm.foo'},
{type: 'config.get', payload: 'server-test.foo'},
{type: 'exit'},
]);
expect(id)
@ -25,7 +25,7 @@ it('propagates override config', withServer(
'@flecks/build': {}
'@flecks/core': {id: 'testing'}
'@flecks/server': {}
'comm:./comm': {foo: 'baz'}
'server-test:./server-test': {foo: 'baz'}
`,
);
},

View File

@ -4,7 +4,7 @@ import {withServer} from './helpers/with-server';
it('propagates runtime config', withServer(async ({server}) => {
const [{payload: foo}] = await server.actions([
{type: 'config.get', payload: 'comm.foo'},
{type: 'config.get', payload: 'server-test.foo'},
{type: 'exit'},
]);
expect(foo)

View File

@ -20,7 +20,7 @@ it('restarts when root sources change', withServer(async ({server, socket}) => {
});
}),
]);
await writeFile(join(server.path, 'comm', 'package.json'), '{}');
await writeFile(join(server.path, 'server-test', 'package.json'), '{}');
await whatHappened;
expect(restarted)
.to.be.true;

View File

@ -1,4 +1,4 @@
'@flecks/build': {}
'@flecks/core': {}
'@flecks/server': {}
'comm:./comm': {}
'server-test:./server-test': {}

View File

@ -2,7 +2,7 @@ import {Flecks} from '@flecks/core';
export const hooks = {
'@flecks/core.reload': (fleck, config) => {
if ('comm' === fleck && 'fail' === config.foo) {
if ('server-test' === fleck && 'fail' === config.foo) {
throw new Error();
}
},