Skip to content

Commit

Permalink
fix: alias
Browse files Browse the repository at this point in the history
  • Loading branch information
cha0s committed Feb 18, 2024
1 parent 5ba0aa2 commit 460c7d6
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions packages/server/test/config-fail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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([
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/config-restart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/config-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/runtime-config-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
`,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/runtime-config-override.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'}
`,
);
},
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/runtime-config-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/source-restart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/template/build/flecks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'@flecks/build': {}
'@flecks/core': {}
'@flecks/server': {}
'comm:./comm': {}
'server-test:./server-test': {}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
},
Expand Down

0 comments on commit 460c7d6

Please sign in to comment.