Skip to content

Commit f70e661

Browse files
committed
fix broken test cases
1 parent 9649806 commit f70e661

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

lib/agent/fixtures/swap/swapEthAndStakeDev.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ describe('depositToProperty.spec.ts', () => {
88

99
const swapContract = {
1010
// eslint-disable-next-line @typescript-eslint/no-unused-vars
11-
swapEthAndStakeDev: (propertyAddress: string) =>
12-
Promise.resolve(stubTx),
11+
'swapEthAndStakeDev(address,uint256,bytes32)': (
12+
propertyAddress: string,
13+
) => Promise.resolve(stubTx),
1314
}
1415

1516
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -26,7 +27,7 @@ describe('depositToProperty.spec.ts', () => {
2627
it('call failure', async () => {
2728
const error = 'error'
2829
const swapContract = {
29-
swapEthAndStakeDev: jest
30+
'swapEthAndStakeDev(address,uint256,bytes32)': jest
3031
.fn()
3132
.mockImplementation(async () => Promise.reject(error)),
3233
}

lib/agent/fixtures/swap/swapEthAndStakeDevPolygon.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ describe('depositToProperty.spec.ts', () => {
88

99
const swapContract = {
1010
// eslint-disable-next-line @typescript-eslint/no-unused-vars
11-
swapEthAndStakeDev: (propertyAddress: string) =>
12-
Promise.resolve(stubTx),
11+
'swapEthAndStakeDev(address,uint256,bytes32)': (
12+
propertyAddress: string,
13+
) => Promise.resolve(stubTx),
1314
}
1415

1516
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -26,7 +27,7 @@ describe('depositToProperty.spec.ts', () => {
2627
it('call failure', async () => {
2728
const error = 'error'
2829
const swapContract = {
29-
swapEthAndStakeDev: jest
30+
'swapEthAndStakeDev(address,uint256,bytes32)': jest
3031
.fn()
3132
.mockImplementation(async () => Promise.reject(error)),
3233
}

lib/ethereum/lockup/depositToProperty.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ describe('depositToProperty.spec.ts', () => {
88

99
const lockupContract = {
1010
// eslint-disable-next-line @typescript-eslint/no-unused-vars
11-
depositToProperty: (propertyAddress: string, amount: number) =>
12-
Promise.resolve(stubTx),
11+
'depositToProperty(address,uint256)': (
12+
propertyAddress: string,
13+
amount: number,
14+
) => Promise.resolve(stubTx),
1315
}
1416

1517
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -26,7 +28,7 @@ describe('depositToProperty.spec.ts', () => {
2628
it('call success with optional payload', async () => {
2729
const expected = stubTransactionResposeFactory({})
2830
const lockupContract = {
29-
depositToProperty: jest
31+
'depositToProperty(address,uint256,bytes32)': jest
3032
.fn()
3133
.mockImplementation(() => Promise.resolve(expected)),
3234
}
@@ -46,7 +48,7 @@ describe('depositToProperty.spec.ts', () => {
4648
it('call failure', async () => {
4749
const error = 'error'
4850
const lockupContract = {
49-
depositToProperty: jest
51+
'depositToProperty(address,uint256)': jest
5052
.fn()
5153
.mockImplementation(async () => Promise.reject(error)),
5254
}

lib/ethereum/s-tokens/setTokenURIDescriptor.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('setTokenURIDescriptor.spec.ts', () => {
1010
const descriptorAddress = '0x88EF51355B34f7Bb4874a731916841702cAeF2C7'
1111

1212
const devContract = {
13-
setTokenURIDescriptor: jest
13+
'setTokenURIDescriptor(address,address)': jest
1414
.fn()
1515
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1616
.mockImplementation(
@@ -35,7 +35,7 @@ describe('setTokenURIDescriptor.spec.ts', () => {
3535
const descriptorAddress = '0x88EF51355B34f7Bb4874a731916841702cAeF2C7'
3636

3737
const devContract = {
38-
setTokenURIDescriptor: jest
38+
'setTokenURIDescriptor(address,address,bytes32[])': jest
3939
.fn()
4040
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4141
.mockImplementation(
@@ -66,7 +66,7 @@ describe('setTokenURIDescriptor.spec.ts', () => {
6666
const descriptorAddress = '0x88EF51355B34f7Bb4874a731916841702cAeF2C7'
6767

6868
const devContract = {
69-
setTokenURIDescriptor: jest
69+
'setTokenURIDescriptor(address,address,bytes32[])': jest
7070
.fn()
7171
// eslint-disable-next-line @typescript-eslint/no-unused-vars
7272
.mockImplementation(
@@ -97,7 +97,7 @@ describe('setTokenURIDescriptor.spec.ts', () => {
9797
const error = 'error'
9898

9999
const devContract = {
100-
setTokenURIDescriptor: jest
100+
'setTokenURIDescriptor(address,address)': jest
101101
.fn()
102102
// eslint-disable-next-line @typescript-eslint/no-unused-vars
103103
.mockImplementation(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"lint": "yarn lint:eslint && yarn lint:format",
4242
"lint:eslint": "eslint . --ext .ts --fix --cache --quiet",
4343
"lint:format": "prettier --write '**/*.{ts,js,json,md,yml}'",
44-
"test": "jest --roots ./lib/",
44+
"test": "jest",
4545
"test:coverage": "jest --coverage",
4646
"prepack": "yarn build",
4747
"clean": "rimraf dist l2 agent",

0 commit comments

Comments
 (0)