From 460c7d61a894ae55bfa86bde76c3b752b1177ede Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 18 Feb 2024 10:32:18 -0600 Subject: [PATCH] fix: alias --- packages/server/test/config-fail.js | 8 ++++---- packages/server/test/config-restart.js | 2 +- packages/server/test/config-update.js | 2 +- packages/server/test/runtime-config-bootstrap.js | 2 +- packages/server/test/runtime-config-override.js | 4 ++-- packages/server/test/runtime-config-runtime.js | 2 +- packages/server/test/source-restart.js | 2 +- packages/server/test/template/build/flecks.yml | 2 +- .../test/template/{comm => server-test}/package.json | 0 .../test/template/{comm => server-test}/src/index.js | 0 .../test/template/{comm => server-test}/src/server.js | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) rename packages/server/test/template/{comm => server-test}/package.json (100%) rename packages/server/test/template/{comm => server-test}/src/index.js (100%) rename packages/server/test/template/{comm => server-test}/src/server.js (86%) diff --git a/packages/server/test/config-fail.js b/packages/server/test/config-fail.js index 483140e0..70ab2104 100644 --- a/packages/server/test/config-fail.js +++ b/packages/server/test/config-fail.js @@ -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; diff --git a/packages/server/test/config-restart.js b/packages/server/test/config-restart.js index 25248659..95358017 100644 --- a/packages/server/test/config-restart.js +++ b/packages/server/test/config-restart.js @@ -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; diff --git a/packages/server/test/config-update.js b/packages/server/test/config-update.js index 5adcf604..b14d760f 100644 --- a/packages/server/test/config-update.js +++ b/packages/server/test/config-update.js @@ -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; diff --git a/packages/server/test/runtime-config-bootstrap.js b/packages/server/test/runtime-config-bootstrap.js index 7030c5ba..35331bfb 100644 --- a/packages/server/test/runtime-config-bootstrap.js +++ b/packages/server/test/runtime-config-bootstrap.js @@ -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'} `, ); diff --git a/packages/server/test/runtime-config-override.js b/packages/server/test/runtime-config-override.js index 12ba2645..2a6c3e7f 100644 --- a/packages/server/test/runtime-config-override.js +++ b/packages/server/test/runtime-config-override.js @@ -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'} `, ); }, diff --git a/packages/server/test/runtime-config-runtime.js b/packages/server/test/runtime-config-runtime.js index 16099452..defec795 100644 --- a/packages/server/test/runtime-config-runtime.js +++ b/packages/server/test/runtime-config-runtime.js @@ -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) diff --git a/packages/server/test/source-restart.js b/packages/server/test/source-restart.js index 0853126a..ab402ab8 100644 --- a/packages/server/test/source-restart.js +++ b/packages/server/test/source-restart.js @@ -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; diff --git a/packages/server/test/template/build/flecks.yml b/packages/server/test/template/build/flecks.yml index ddbe476b..3bde201c 100644 --- a/packages/server/test/template/build/flecks.yml +++ b/packages/server/test/template/build/flecks.yml @@ -1,4 +1,4 @@ '@flecks/build': {} '@flecks/core': {} '@flecks/server': {} -'comm:./comm': {} +'server-test:./server-test': {} diff --git a/packages/server/test/template/comm/package.json b/packages/server/test/template/server-test/package.json similarity index 100% rename from packages/server/test/template/comm/package.json rename to packages/server/test/template/server-test/package.json diff --git a/packages/server/test/template/comm/src/index.js b/packages/server/test/template/server-test/src/index.js similarity index 100% rename from packages/server/test/template/comm/src/index.js rename to packages/server/test/template/server-test/src/index.js diff --git a/packages/server/test/template/comm/src/server.js b/packages/server/test/template/server-test/src/server.js similarity index 86% rename from packages/server/test/template/comm/src/server.js rename to packages/server/test/template/server-test/src/server.js index bca203d1..bda5a755 100644 --- a/packages/server/test/template/comm/src/server.js +++ b/packages/server/test/template/server-test/src/server.js @@ -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(); } },