Skip to content

Commit

Permalink
refactor: rm util-dev dependency on cip2 package
Browse files Browse the repository at this point in the history
hoist SelectionConstraints mock utils to cip2/test/util
  • Loading branch information
mkazlauskas committed May 20, 2022
1 parent 4df6958 commit 8013319
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 35 deletions.
3 changes: 2 additions & 1 deletion packages/cip2/test/RoundRobinRandomImprove.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AssetId, SelectionConstraints, TxTestUtil } from '@cardano-sdk/util-dev';
import { AssetId, TxTestUtil } from '@cardano-sdk/util-dev';
import { InputSelectionError, InputSelectionFailure } from '../src/InputSelectionError';
import {
SelectionConstraints,
assertFailureProperties,
assertInputSelectionProperties,
generateSelectionParams,
Expand Down
1 change: 1 addition & 0 deletions packages/cip2/test/util/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './properties';
export * from './tests';
export * as SelectionConstraints from './selectionConstraints';
3 changes: 2 additions & 1 deletion packages/cip2/test/util/properties.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AssetId, SelectionConstraints } from '@cardano-sdk/util-dev';
import * as SelectionConstraints from './selectionConstraints';
import { AssetId } from '@cardano-sdk/util-dev';
import { Cardano, cslUtil } from '@cardano-sdk/core';
import { InputSelectionError, InputSelectionFailure } from '../../src/InputSelectionError';
import { SelectionResult } from '../../src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Cardano } from '@cardano-sdk/core';
import { SelectionConstraints } from '@cardano-sdk/cip2';
import { SelectionConstraints } from '../../src';

export interface MockSelectionConstraints {
minimumCoinQuantity: bigint;
Expand Down
2 changes: 1 addition & 1 deletion packages/cip2/test/util/tests.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as SelectionConstraints from './selectionConstraints';
import { Cardano } from '@cardano-sdk/core';
import { InputSelectionError, InputSelectionFailure } from '../../src/InputSelectionError';
import { InputSelector } from '../../src/types';
import { SelectionConstraints } from '@cardano-sdk/util-dev';
import { assertInputSelectionProperties } from './properties';

export interface InputSelectionPropertiesTestParams {
Expand Down
3 changes: 0 additions & 3 deletions packages/util-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"prepack": "yarn build",
"test:debug": "DEBUG=true yarn test"
},
"devDependencies": {
"@cardano-sdk/cip2": " 0.2.0"
},
"dependencies": {
"@cardano-sdk/core": " 0.2.0",
"rxjs": "^7.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/util-dev/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * as AssetId from './assetId';
export * as CslTestUtil from './cslTestUtil';
export * as TxTestUtil from './txTestUtil';
export * as SelectionConstraints from './selectionConstraints';
export * from './util';
export * from './createStubStakePoolSearchProvider';
export * from './stubLogger';
Expand Down
19 changes: 0 additions & 19 deletions packages/util-dev/test/selectionConstraints.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Cardano, WalletProvider } from '@cardano-sdk/core';
import { CreateTxInternalsProps, createTransactionInternals } from '../../src/Transaction';
import { SelectionConstraints } from '@cardano-sdk/util-dev';
import { SelectionConstraints } from '../../../cip2/test/util';
import { SelectionSkeleton, roundRobinRandomImprove } from '@cardano-sdk/cip2';
import { mockWalletProvider, utxo } from '../mocks';

Expand Down
28 changes: 21 additions & 7 deletions packages/wallet/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@
"baseUrl": "."
},
"references": [
{ "path": "../src" },
{ "path": "../../util-dev/src" },
{ "path": "../../cip2/src" },
{ "path": "../../core/src" },
{ "path": "../../cip30/src" },
{ "path": "../../cardano-graphql/src" },
{ "path": "../../ogmios/src" }
{
"path": "../../cip2/test"
},
{
"path": "../src"
},
{
"path": "../../util-dev/src"
},
{
"path": "../../cip2/src"
},
{
"path": "../../core/src"
},
{
"path": "../../cip30/src"
},
{
"path": "../../ogmios/src"
}
]
}

0 comments on commit 8013319

Please sign in to comment.