diff --git a/integration/config.ts b/test/integration/config.ts similarity index 98% rename from integration/config.ts rename to test/integration/config.ts index 3d2bd3d..539797f 100644 --- a/integration/config.ts +++ b/test/integration/config.ts @@ -1,4 +1,4 @@ -import { Config } from '../src' +import { Config } from '../../src' import HDWalletProvider from '@truffle/hdwallet-provider' const configJson: Config = { diff --git a/integration/mocha.opts b/test/integration/mocha.opts similarity index 100% rename from integration/mocha.opts rename to test/integration/mocha.opts diff --git a/integration/ocean/AssetOwners.test.ts b/test/integration/ocean/AssetOwners.test.ts similarity index 97% rename from integration/ocean/AssetOwners.test.ts rename to test/integration/ocean/AssetOwners.test.ts index d26fcd8..1c93405 100644 --- a/integration/ocean/AssetOwners.test.ts +++ b/test/integration/ocean/AssetOwners.test.ts @@ -1,7 +1,7 @@ import { assert } from 'chai' import { config } from '../config' import { getMetadata } from '../utils' -import { Ocean, Account } from '../../src' // @oceanprotocol/squid +import { Ocean, Account } from '../../../src' // @oceanprotocol/squid describe('Asset Owners', () => { let ocean: Ocean diff --git a/integration/ocean/AuthenticationToken.test.ts b/test/integration/ocean/AuthenticationToken.test.ts similarity index 96% rename from integration/ocean/AuthenticationToken.test.ts rename to test/integration/ocean/AuthenticationToken.test.ts index 9c0f601..9ff07f6 100644 --- a/integration/ocean/AuthenticationToken.test.ts +++ b/test/integration/ocean/AuthenticationToken.test.ts @@ -1,6 +1,6 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, Account } from '../../src' // @oceanprotocol/squid +import { Ocean, Account } from '../../../src' // @oceanprotocol/squid describe('Authentication Token', () => { let ocean: Ocean diff --git a/integration/ocean/Compute.test.ts b/test/integration/ocean/Compute.test.ts similarity index 98% rename from integration/ocean/Compute.test.ts rename to test/integration/ocean/Compute.test.ts index 617fac0..1c71ffa 100644 --- a/integration/ocean/Compute.test.ts +++ b/test/integration/ocean/Compute.test.ts @@ -1,7 +1,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, Account, DDO, MetaData, ComputeJobStatus } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DDO, MetaData, ComputeJobStatus } from '../../../src' // @oceanprotocol/squid import { getMetadata, getComputeServiceExample } from '../utils' const metadataAsset = getMetadata() diff --git a/integration/ocean/ConsumeAsset.test.ts b/test/integration/ocean/ConsumeAsset.test.ts similarity index 98% rename from integration/ocean/ConsumeAsset.test.ts rename to test/integration/ocean/ConsumeAsset.test.ts index 6d92fcf..ca8b8eb 100644 --- a/integration/ocean/ConsumeAsset.test.ts +++ b/test/integration/ocean/ConsumeAsset.test.ts @@ -4,7 +4,7 @@ import * as fs from 'fs' import { config } from '../config' import { getMetadata } from '../utils' -import { Ocean, DDO, Account, ConditionState } from '../../src' // @oceanprotocol/squid +import { Ocean, DDO, Account, ConditionState } from '../../../src' // @oceanprotocol/squid describe('Consume Asset', () => { let ocean: Ocean diff --git a/integration/ocean/ConsumeAssetBrizo.test.ts b/test/integration/ocean/ConsumeAssetBrizo.test.ts similarity index 96% rename from integration/ocean/ConsumeAssetBrizo.test.ts rename to test/integration/ocean/ConsumeAssetBrizo.test.ts index b150dfd..f3007a1 100644 --- a/integration/ocean/ConsumeAssetBrizo.test.ts +++ b/test/integration/ocean/ConsumeAssetBrizo.test.ts @@ -4,7 +4,7 @@ import * as fs from 'fs' import { config } from '../config' import { getMetadata } from '../utils' -import { Ocean, Account, DDO } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DDO } from '../../../src' // @oceanprotocol/squid describe('Consume Asset (Brizo)', () => { let ocean: Ocean diff --git a/integration/ocean/ConsumeBigAsset.test.ts b/test/integration/ocean/ConsumeBigAsset.test.ts similarity index 96% rename from integration/ocean/ConsumeBigAsset.test.ts rename to test/integration/ocean/ConsumeBigAsset.test.ts index 181ac43..015d802 100644 --- a/integration/ocean/ConsumeBigAsset.test.ts +++ b/test/integration/ocean/ConsumeBigAsset.test.ts @@ -4,7 +4,7 @@ import * as fs from 'fs' import { config } from '../config' import { getMetadata } from '../utils' -import { Ocean, Account, DDO } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DDO } from '../../../src' // @oceanprotocol/squid // Ensure that your network is fast enought and you have some free ram before run it. xdescribe('Consume Asset (Large size)', () => { diff --git a/integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts b/test/integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts similarity index 99% rename from integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts rename to test/integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts index acb56f4..53ea58b 100644 --- a/integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts +++ b/test/integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, templates, conditions, utils, Account, Keeper } from '../../src' // @oceanprotocol/squid +import { Ocean, templates, conditions, utils, Account, Keeper } from '../../../src' // @oceanprotocol/squid const { LockRewardCondition, EscrowReward, AccessSecretStoreCondition } = conditions diff --git a/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts b/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts similarity index 99% rename from integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts rename to test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts index a841ec1..5c5dde3 100644 --- a/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts +++ b/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, templates, conditions, utils, Account, Keeper } from '../../src' // @oceanprotocol/squid +import { Ocean, templates, conditions, utils, Account, Keeper } from '../../../src' // @oceanprotocol/squid const { LockRewardCondition, EscrowReward, ComputeExecutionCondition } = conditions diff --git a/integration/ocean/SearchAsset.test.ts b/test/integration/ocean/SearchAsset.test.ts similarity index 97% rename from integration/ocean/SearchAsset.test.ts rename to test/integration/ocean/SearchAsset.test.ts index ec6b8b9..7e8ba4d 100644 --- a/integration/ocean/SearchAsset.test.ts +++ b/test/integration/ocean/SearchAsset.test.ts @@ -4,7 +4,7 @@ import { config } from '../config' import { generateMetadata } from '../utils' -import { Ocean, Account, DDO } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DDO } from '../../../src' // @oceanprotocol/squid describe('Search Asset', () => { let ocean: Ocean diff --git a/integration/ocean/SecretStore.test.ts b/test/integration/ocean/SecretStore.test.ts similarity index 89% rename from integration/ocean/SecretStore.test.ts rename to test/integration/ocean/SecretStore.test.ts index 91e578b..3b9f2a9 100644 --- a/integration/ocean/SecretStore.test.ts +++ b/test/integration/ocean/SecretStore.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, Account, DID } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DID } from '../../../src' // @oceanprotocol/squid describe('Secret Store', () => { let ocean: Ocean diff --git a/integration/ocean/Signature.test.ts b/test/integration/ocean/Signature.test.ts similarity index 97% rename from integration/ocean/Signature.test.ts rename to test/integration/ocean/Signature.test.ts index 44828f9..71a959c 100644 --- a/integration/ocean/Signature.test.ts +++ b/test/integration/ocean/Signature.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, Account, DDO } from '../../src' // @oceanprotocol/squid +import { Ocean, Account, DDO } from '../../../src' // @oceanprotocol/squid // WARN: not integration test. It has been done here because constant values // depends on the first account on spree (only accessible from integration test) diff --git a/integration/ocean/Versions.test.ts b/test/integration/ocean/Versions.test.ts similarity index 88% rename from integration/ocean/Versions.test.ts rename to test/integration/ocean/Versions.test.ts index 5021171..af63b26 100644 --- a/integration/ocean/Versions.test.ts +++ b/test/integration/ocean/Versions.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { config } from '../config' -import { Ocean, OceanPlatformTechStatus } from '../../src' // @oceanprotocol/squid +import { Ocean, OceanPlatformTechStatus } from '../../../src' // @oceanprotocol/squid describe('Versions', () => { let ocean: Ocean diff --git a/integration/tsconfig.json b/test/integration/tsconfig.json similarity index 100% rename from integration/tsconfig.json rename to test/integration/tsconfig.json diff --git a/integration/utils/ddo-metadata-generator.ts b/test/integration/utils/ddo-metadata-generator.ts similarity index 93% rename from integration/utils/ddo-metadata-generator.ts rename to test/integration/utils/ddo-metadata-generator.ts index 7fbdb13..9269bb0 100644 --- a/integration/utils/ddo-metadata-generator.ts +++ b/test/integration/utils/ddo-metadata-generator.ts @@ -1,6 +1,6 @@ -import { MetaData, MetaDataAlgorithm } from '../../src' // @oceanprotocol/squid -import { ServiceType } from '../../src/ddo/Service' -import ddoExample from '../../test/__fixtures__/ddo.json' +import { MetaData, MetaDataAlgorithm } from '../../../src' // @oceanprotocol/squid +import { ServiceType } from '../../../src/ddo/Service' +import ddoExample from '../../unit/__fixtures__/ddo.json' const metadata: Partial = { main: { diff --git a/integration/utils/index.ts b/test/integration/utils/index.ts similarity index 100% rename from integration/utils/index.ts rename to test/integration/utils/index.ts diff --git a/test/Squid.test.ts b/test/unit/Squid.test.ts similarity index 82% rename from test/Squid.test.ts rename to test/unit/Squid.test.ts index b82ee4d..517e9aa 100644 --- a/test/Squid.test.ts +++ b/test/unit/Squid.test.ts @@ -1,5 +1,5 @@ import assert from 'assert' -import * as squid from '../src/squid' +import * as squid from '../../src/squid' describe('Squid', () => { describe('interface', () => { diff --git a/test/TestIdGenerator.ts b/test/unit/TestIdGenerator.ts similarity index 66% rename from test/TestIdGenerator.ts rename to test/unit/TestIdGenerator.ts index d6b85ad..a0b2a76 100644 --- a/test/TestIdGenerator.ts +++ b/test/unit/TestIdGenerator.ts @@ -1,4 +1,4 @@ -import { generateId } from '../src/utils/GeneratorHelpers' +import { generateId } from '../../src/utils/GeneratorHelpers' export default class TestIdGenerator { public static generatePrefixedId() { diff --git a/test/__fixtures__/ddo.json b/test/unit/__fixtures__/ddo.json similarity index 100% rename from test/__fixtures__/ddo.json rename to test/unit/__fixtures__/ddo.json diff --git a/test/__mocks__/Aquarius.mock.ts b/test/unit/__mocks__/Aquarius.mock.ts similarity index 100% rename from test/__mocks__/Aquarius.mock.ts rename to test/unit/__mocks__/Aquarius.mock.ts diff --git a/test/__mocks__/ContractBase.Mock.ts b/test/unit/__mocks__/ContractBase.Mock.ts similarity index 84% rename from test/__mocks__/ContractBase.Mock.ts rename to test/unit/__mocks__/ContractBase.Mock.ts index 21bc9b3..cf365f4 100644 --- a/test/__mocks__/ContractBase.Mock.ts +++ b/test/unit/__mocks__/ContractBase.Mock.ts @@ -1,4 +1,4 @@ -import ContractBase from '../../src/keeper/contracts/ContractBase' +import ContractBase from '../../../src/keeper/contracts/ContractBase' export default class ContractBaseMock extends ContractBase { public async initMock(config: any) { diff --git a/test/__mocks__/SecretStore.mock.ts b/test/unit/__mocks__/SecretStore.mock.ts similarity index 100% rename from test/__mocks__/SecretStore.mock.ts rename to test/unit/__mocks__/SecretStore.mock.ts diff --git a/test/__mocks__/WebServiceConnector.mock.ts b/test/unit/__mocks__/WebServiceConnector.mock.ts similarity index 100% rename from test/__mocks__/WebServiceConnector.mock.ts rename to test/unit/__mocks__/WebServiceConnector.mock.ts diff --git a/test/aquarius/Aquarius.test.ts b/test/unit/aquarius/Aquarius.test.ts similarity index 94% rename from test/aquarius/Aquarius.test.ts rename to test/unit/aquarius/Aquarius.test.ts index 0927779..e9ff8f9 100644 --- a/test/aquarius/Aquarius.test.ts +++ b/test/unit/aquarius/Aquarius.test.ts @@ -1,11 +1,11 @@ import { assert, spy, use } from 'chai' import spies from 'chai-spies' -import { Ocean } from '../../src/ocean/Ocean' -import { Aquarius, SearchQuery } from '../../src/aquarius/Aquarius' -import { DDO } from '../../src/ddo/DDO' -import DID from '../../src/ocean/DID' +import { Ocean } from '../../../src/ocean/Ocean' +import { Aquarius, SearchQuery } from '../../../src/aquarius/Aquarius' +import { DDO } from '../../../src/ddo/DDO' +import DID from '../../../src/ocean/DID' import config from '../config' -import { LoggerInstance } from '../../src/utils' +import { LoggerInstance } from '../../../src/utils' use(spies) diff --git a/test/config.ts b/test/unit/config.ts similarity index 75% rename from test/config.ts rename to test/unit/config.ts index 1954f33..aaf62df 100644 --- a/test/config.ts +++ b/test/unit/config.ts @@ -1,5 +1,5 @@ -import { Config, LogLevel } from '../src/models/Config' -import { LoggerInstance } from '../src/utils' +import { Config, LogLevel } from '../../src/models/Config' +import { LoggerInstance } from '../../src/utils' LoggerInstance.setLevel(LogLevel.Error) diff --git a/test/ddo/DDO.test.ts b/test/unit/ddo/DDO.test.ts similarity index 98% rename from test/ddo/DDO.test.ts rename to test/unit/ddo/DDO.test.ts index 001d419..6f06ca8 100644 --- a/test/ddo/DDO.test.ts +++ b/test/unit/ddo/DDO.test.ts @@ -1,9 +1,9 @@ import { assert, expect, spy, use } from 'chai' import spies from 'chai-spies' -import { DDO } from '../../src/ddo/DDO' -import { Service } from '../../src/ddo/Service' -import { Ocean } from '../../src/ocean/Ocean' +import { DDO } from '../../../src/ddo/DDO' +import { Service } from '../../../src/ddo/Service' +import { Ocean } from '../../../src/ocean/Ocean' import config from '../config' import TestContractHandler from '../keeper/TestContractHandler' diff --git a/test/keeper/ContractBase.test.ts b/test/unit/keeper/ContractBase.test.ts similarity index 100% rename from test/keeper/ContractBase.test.ts rename to test/unit/keeper/ContractBase.test.ts diff --git a/test/keeper/ContractEvent.test.ts b/test/unit/keeper/ContractEvent.test.ts similarity index 100% rename from test/keeper/ContractEvent.test.ts rename to test/unit/keeper/ContractEvent.test.ts diff --git a/test/keeper/ContractHandler.test.ts b/test/unit/keeper/ContractHandler.test.ts similarity index 100% rename from test/keeper/ContractHandler.test.ts rename to test/unit/keeper/ContractHandler.test.ts diff --git a/test/keeper/DIDRegistry.test.ts b/test/unit/keeper/DIDRegistry.test.ts similarity index 100% rename from test/keeper/DIDRegistry.test.ts rename to test/unit/keeper/DIDRegistry.test.ts diff --git a/test/keeper/EventHandler.test.ts b/test/unit/keeper/EventHandler.test.ts similarity index 95% rename from test/keeper/EventHandler.test.ts rename to test/unit/keeper/EventHandler.test.ts index 7e40e33..f4ed8f6 100644 --- a/test/keeper/EventHandler.test.ts +++ b/test/unit/keeper/EventHandler.test.ts @@ -1,7 +1,7 @@ import { assert, expect, spy, use } from 'chai' import spies from 'chai-spies' -import { EventHandler } from '../../src/keeper/EventHandler' -import { Ocean } from '../../src/ocean/Ocean' +import { EventHandler } from '../../../src/keeper/EventHandler' +import { Ocean } from '../../../src/ocean/Ocean' import config from '../config' use(spies) diff --git a/test/keeper/Keeper.test.ts b/test/unit/keeper/Keeper.test.ts similarity index 100% rename from test/keeper/Keeper.test.ts rename to test/unit/keeper/Keeper.test.ts diff --git a/test/keeper/TestContractHandler.ts b/test/unit/keeper/TestContractHandler.ts similarity index 100% rename from test/keeper/TestContractHandler.ts rename to test/unit/keeper/TestContractHandler.ts diff --git a/test/keeper/conditions/AccessSecretStoreCondition.test.ts b/test/unit/keeper/conditions/AccessSecretStoreCondition.test.ts similarity index 100% rename from test/keeper/conditions/AccessSecretStoreCondition.test.ts rename to test/unit/keeper/conditions/AccessSecretStoreCondition.test.ts diff --git a/test/keeper/conditions/EscrowReward.test.ts b/test/unit/keeper/conditions/EscrowReward.test.ts similarity index 100% rename from test/keeper/conditions/EscrowReward.test.ts rename to test/unit/keeper/conditions/EscrowReward.test.ts diff --git a/test/keeper/conditions/LockRewardCondition.test.ts b/test/unit/keeper/conditions/LockRewardCondition.test.ts similarity index 100% rename from test/keeper/conditions/LockRewardCondition.test.ts rename to test/unit/keeper/conditions/LockRewardCondition.test.ts diff --git a/test/mocha.opts b/test/unit/mocha.opts similarity index 100% rename from test/mocha.opts rename to test/unit/mocha.opts diff --git a/test/ocean/Account.test.ts b/test/unit/ocean/Account.test.ts similarity index 100% rename from test/ocean/Account.test.ts rename to test/unit/ocean/Account.test.ts diff --git a/test/ocean/DID.test.ts b/test/unit/ocean/DID.test.ts similarity index 100% rename from test/ocean/DID.test.ts rename to test/unit/ocean/DID.test.ts diff --git a/test/ocean/Ocean.test.ts b/test/unit/ocean/Ocean.test.ts similarity index 100% rename from test/ocean/Ocean.test.ts rename to test/unit/ocean/Ocean.test.ts diff --git a/test/ocean/OceanAccounts.test.ts b/test/unit/ocean/OceanAccounts.test.ts similarity index 100% rename from test/ocean/OceanAccounts.test.ts rename to test/unit/ocean/OceanAccounts.test.ts diff --git a/test/ocean/OceanAssets.test.ts b/test/unit/ocean/OceanAssets.test.ts similarity index 100% rename from test/ocean/OceanAssets.test.ts rename to test/unit/ocean/OceanAssets.test.ts diff --git a/test/ocean/OceanAuth.test.ts b/test/unit/ocean/OceanAuth.test.ts similarity index 100% rename from test/ocean/OceanAuth.test.ts rename to test/unit/ocean/OceanAuth.test.ts diff --git a/test/ocean/OceanCompute.test.ts b/test/unit/ocean/OceanCompute.test.ts similarity index 95% rename from test/ocean/OceanCompute.test.ts rename to test/unit/ocean/OceanCompute.test.ts index 214abfb..74901bb 100644 --- a/test/ocean/OceanCompute.test.ts +++ b/test/unit/ocean/OceanCompute.test.ts @@ -1,10 +1,10 @@ import { assert } from 'chai' import sinon from 'sinon' -import { Ocean } from '../../src/ocean/Ocean' +import { Ocean } from '../../../src/ocean/Ocean' import config from '../config' -import { Account } from '../../src/squid' -import { OceanCompute, ComputeJobStatus } from '../../src/ocean/OceanCompute' +import { Account } from '../../../src/squid' +import { OceanCompute, ComputeJobStatus } from '../../../src/ocean/OceanCompute' import TestIdGenerator from '../TestIdGenerator' describe('OceanCompute', () => { diff --git a/test/ocean/OceanSecretStore.test.ts b/test/unit/ocean/OceanSecretStore.test.ts similarity index 100% rename from test/ocean/OceanSecretStore.test.ts rename to test/unit/ocean/OceanSecretStore.test.ts diff --git a/test/ocean/utils/SignatureUtils.test.ts b/test/unit/ocean/utils/SignatureUtils.test.ts similarity index 100% rename from test/ocean/utils/SignatureUtils.test.ts rename to test/unit/ocean/utils/SignatureUtils.test.ts diff --git a/test/tsconfig.json b/test/unit/tsconfig.json similarity index 100% rename from test/tsconfig.json rename to test/unit/tsconfig.json diff --git a/test/utils/ConversionTypeHelpers.test.ts b/test/unit/utils/ConversionTypeHelpers.test.ts similarity index 100% rename from test/utils/ConversionTypeHelpers.test.ts rename to test/unit/utils/ConversionTypeHelpers.test.ts diff --git a/test/utils/GeneratorHelpers.test.ts b/test/unit/utils/GeneratorHelpers.test.ts similarity index 100% rename from test/utils/GeneratorHelpers.test.ts rename to test/unit/utils/GeneratorHelpers.test.ts diff --git a/test/utils/SubscribableObserver.test.ts b/test/unit/utils/SubscribableObserver.test.ts similarity index 100% rename from test/utils/SubscribableObserver.test.ts rename to test/unit/utils/SubscribableObserver.test.ts diff --git a/test/utils/SubscribablePromise.test.ts b/test/unit/utils/SubscribablePromise.test.ts similarity index 98% rename from test/utils/SubscribablePromise.test.ts rename to test/unit/utils/SubscribablePromise.test.ts index 850419a..5f7d8bd 100644 --- a/test/utils/SubscribablePromise.test.ts +++ b/test/unit/utils/SubscribablePromise.test.ts @@ -1,7 +1,7 @@ import { assert, expect, spy, use } from 'chai' import spies from 'chai-spies' -import { SubscribablePromise } from '../../src/utils/SubscribablePromise' +import { SubscribablePromise } from '../../../src/utils/SubscribablePromise' use(spies)