diff --git a/libs/application-config/src/lib/applications-config.spec.ts b/libs/application-config/src/lib/applications-config.spec.ts index 111b119..6e7389b 100644 --- a/libs/application-config/src/lib/applications-config.spec.ts +++ b/libs/application-config/src/lib/applications-config.spec.ts @@ -18,19 +18,19 @@ describe('Service Configurations', () => { } = require('./applications-config'); expect(gatewayConfig).toEqual({ - host: 'localhost', + host: 'http://localhost', name: 'gateway', port: '3333', }); expect(userSubGraph).toEqual({ - host: 'localhost', + host: 'http://localhost', name: 'user', port: '15001', }); expect(taskSubGraph).toEqual({ - host: 'localhost', + host: 'http://localhost', name: 'task', port: '15002', }); diff --git a/libs/application-config/src/lib/applications-config.ts b/libs/application-config/src/lib/applications-config.ts index fce870a..63f4909 100644 --- a/libs/application-config/src/lib/applications-config.ts +++ b/libs/application-config/src/lib/applications-config.ts @@ -4,7 +4,7 @@ interface ApplicationConfig { name: string; } -const DEFAULT_HOST = 'localhost'; +const DEFAULT_HOST = 'http://localhost'; const DEFAULT_PORT = { user: '15001', diff --git a/libs/application-config/src/lib/subgraphs-config.spec.ts b/libs/application-config/src/lib/subgraphs-config.spec.ts new file mode 100644 index 0000000..4782a64 --- /dev/null +++ b/libs/application-config/src/lib/subgraphs-config.spec.ts @@ -0,0 +1,12 @@ +import { subgraphsConfig } from './subgraphs-config'; +import { userSubGraph } from './applications-config'; + +describe('subgraphsConfig', () => { + it('should have the correct configuration for the user subgraph', () => { + expect(subgraphsConfig).toHaveLength(1); + expect(subgraphsConfig[0]).toEqual({ + name: userSubGraph.name, + url: `${userSubGraph.host}:${userSubGraph.port}/graphql`, + }); + }); +});