diff --git a/packages/streams/src/Streams.test.ts b/packages/streams/src/Streams.test.ts new file mode 100644 index 0000000000..8dc504a2c6 --- /dev/null +++ b/packages/streams/src/Streams.test.ts @@ -0,0 +1,20 @@ +import { ApiUtils } from '@moralisweb3/api-utils'; +import { Core } from '@moralisweb3/common-core'; +import { Streams } from './Streams'; + +describe('Streams', () => { + function setupStreams() { + const core = Core.create(); + const apiUtils = ApiUtils.create(core); + const streams = Streams.create(core); + core.registerModules([apiUtils, streams]); + + return { core, streams }; + } + + it('returns default baseUrl', () => { + const { streams } = setupStreams(); + + expect(streams.baseUrl).toBe('https://api.moralis-streams.com'); + }); +}); diff --git a/packages/streams/src/Streams.ts b/packages/streams/src/Streams.ts index db798215af..38c6d5f2a0 100644 --- a/packages/streams/src/Streams.ts +++ b/packages/streams/src/Streams.ts @@ -39,7 +39,7 @@ export class Streams extends ApiModule { } private constructor(core: Core) { - super(Streams.moduleName, core, BASE_URL); + super(Streams.moduleName, core, () => BASE_URL); } public setup() {