Skip to content

Commit 5f02f8e

Browse files
marcocastignolikuzdogan
authored andcommitted
Use etherscanResponseMock from server in lib-sourcify's tests
1 parent 4f0a6bf commit 5f02f8e

File tree

3 files changed

+9
-211
lines changed

3 files changed

+9
-211
lines changed

packages/lib-sourcify/test/utils/etherscan-util.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111
EtherscanUtils,
1212
} from '../../src';
1313
import { solc, vyperCompiler } from '../utils';
14+
// Here we import the mock responses directly from server to avoid duplication
15+
// and ensure consistency across lib-sourcify and server tests.
1416
import {
1517
INVALID_API_KEY_RESPONSE,
1618
MULTIPLE_CONTRACT_RESPONSE,
@@ -21,7 +23,7 @@ import {
2123
VYPER_SINGLE_CONTRACT_RESPONSE,
2224
VYPER_STANDARD_JSON_CONTRACT_RESPONSE,
2325
mockEtherscanApi,
24-
} from './etherscanResponseMocks';
26+
} from '../../../../services/server/test/helpers/etherscanResponseMocks';
2527
import { EtherscanImportError } from '../../src/utils/etherscan/EtherscanTypes';
2628

2729
use(chaiHttp);
@@ -46,7 +48,7 @@ describe('etherscan util (lib)', function () {
4648
nock.cleanAll();
4749
});
4850

49-
describe.only('fetchFromEtherscan', () => {
51+
describe('fetchFromEtherscan', () => {
5052
it('should throw when fetching a non verified contract from etherscan', async () => {
5153
const scope = mockEtherscanApi(
5254
sourcifyChain,

0 commit comments

Comments
 (0)