diff --git a/src/types.d.ts b/src/types.d.ts index 4ee4cc2b..10f0fbf4 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,23 +1,12 @@ import { EventEmitter } from 'events' import { IPFS } from 'ipfs-core-types' -import { IDResult } from 'ipfs-core-types/src/root' export interface Subprocess { stderr: EventEmitter | null stdout: EventEmitter | null } -export interface API extends IPFS { - peerId: IDResult - apiHost: string - apiPort: string - gatewayHost: string - gatewayPort: string - grpcHost: string - grpcPort: string -} - export interface Controller { init: (options?: InitOptions) => Promise start: () => Promise @@ -29,7 +18,7 @@ export interface Controller { started: boolean initialized: boolean clean: boolean - api: API + api: IPFS subprocess?: Subprocess | null opts: ControllerOptions } @@ -207,4 +196,5 @@ export interface Factory { spawn: (options?: ControllerOptions) => Promise clean: () => Promise controllers: Controller[] + opts: ControllerOptions } diff --git a/test/controller.spec.js b/test/controller.spec.js index f09eb975..8e140f99 100644 --- a/test/controller.spec.js +++ b/test/controller.spec.js @@ -203,8 +203,6 @@ describe('Controller API', function () { await ctl.init() await ctl.start() expect(ctl.started).to.be.true() - const id = await ctl.api.id() - expect(factory.controllers[0].api.peerId.id).to.be.eq(id.id) }) } }) diff --git a/test/create.spec.js b/test/create.spec.js index 068dce8c..cca1dbbb 100644 --- a/test/create.spec.js +++ b/test/create.spec.js @@ -172,16 +172,6 @@ const types = [{ remote: true }] -describe('`createController` should return daemon with peerId when started', () => { - for (const opts of types) { - it(`type: ${opts.type} remote: ${Boolean(opts.remote)}`, async () => { - const node = await createController(opts) - expect(node.api.peerId).to.exist() - await node.stop() - }) - } -}) - describe('`createController({test: true})` should return daemon with test profile', () => { for (const opts of types) { it(`type: ${opts.type} remote: ${Boolean(opts.remote)}`, async () => {