From 79bca89f731b35803b4880fbacbfc60beb4c3461 Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 30 May 2024 12:06:15 -0400 Subject: [PATCH] fix imports and error message --- src/core/dwn-error.ts | 2 +- tests/handlers/messages-get.spec.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/dwn-error.ts b/src/core/dwn-error.ts index 5291f9258..1cb648271 100644 --- a/src/core/dwn-error.ts +++ b/src/core/dwn-error.ts @@ -45,7 +45,7 @@ export enum DwnErrorCode { IndexMissingIndexableProperty = 'IndexMissingIndexableProperty', JwsDecodePlainObjectPayloadInvalid = 'JwsDecodePlainObjectPayloadInvalid', MessagesGetInvalidCid = 'MessagesGetInvalidCid', - MessagesGetAuthorizationFailed = 'AuthorizationFailed', + MessagesGetAuthorizationFailed = 'MessagesGetAuthorizationFailed', ParseCidCodecNotSupported = 'ParseCidCodecNotSupported', ParseCidMultihashNotSupported = 'ParseCidMultihashNotSupported', PermissionsProtocolValidateSchemaUnexpectedRecord = 'PermissionsProtocolValidateSchemaUnexpectedRecord', diff --git a/tests/handlers/messages-get.spec.ts b/tests/handlers/messages-get.spec.ts index 08bbe0304..df1c8cfd6 100644 --- a/tests/handlers/messages-get.spec.ts +++ b/tests/handlers/messages-get.spec.ts @@ -7,16 +7,23 @@ import type { MessageStore } from '../../src/index.js'; +import { DataStream } from '../../src/utils/data-stream.js'; +import { Dwn } from '../../src/dwn.js'; +import { DwnConstant } from '../../src/core/dwn-constant.js'; +import { DwnErrorCode } from '../../src/core/dwn-error.js'; import { expect } from 'chai'; +import { Jws } from '../../src/utils/jws.js'; import { Message } from '../../src/core/message.js'; import { MessagesGet } from '../../src/interfaces/messages-get.js'; import { MessagesGetHandler } from '../../src/handlers/messages-get.js'; +import { PermissionsProtocol } from '../../src/protocols/permissions.js'; import { stubInterface } from 'ts-sinon'; import { TestDataGenerator } from '../utils/test-data-generator.js'; import { TestEventStream } from '../test-event-stream.js'; import { TestStores } from '../test-stores.js'; -import { DataStream, Dwn, DwnConstant, DwnErrorCode, DwnInterfaceName, DwnMethodName, Jws, PermissionsProtocol, Time } from '../../src/index.js'; +import { Time } from '../../src/utils/time.js'; import { DidKey, UniversalResolver } from '@web5/dids'; +import { DwnInterfaceName, DwnMethodName } from '../../src/enums/dwn-interface-method.js'; import sinon from 'sinon';