File tree 2 files changed +7
-9
lines changed
packages/testing/ts/__tests__/unit
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change
1
+ import { expect } from "chai" ;
1
2
import { ZeroAddress } from "ethers" ;
2
- import { getDefaultSigner } from "maci-contracts" ;
3
-
4
- import { fundWallet } from "../fundWallet" ;
3
+ import { getDefaultSigner , fundWallet } from "maci-sdk" ;
5
4
6
5
describe ( "fundWallet" , ( ) => {
7
6
it ( "should increase the balance of a wallet" , async ( ) => {
@@ -11,6 +10,6 @@ describe("fundWallet", () => {
11
10
await fundWallet ( { amount : 1000000000 , address : ZeroAddress , signer } ) ;
12
11
const balanceAfter = await signer . provider ?. getBalance ( ZeroAddress ) ;
13
12
14
- expect ( Number ( balanceAfter ) ) . toBeGreaterThan ( Number ( balanceBefore ! ) ) ;
13
+ expect ( Number ( balanceAfter ) ) . to . be . gt ( Number ( balanceBefore ! ) ) ;
15
14
} ) ;
16
15
} ) ;
Original file line number Diff line number Diff line change 1
- import { getDefaultSigner } from "maci-contracts" ;
2
-
3
- import { timeTravel } from "../timeTravel" ;
1
+ import { expect } from "chai" ;
2
+ import { getDefaultSigner , timeTravel } from "maci-sdk" ;
4
3
5
4
describe ( "timeTravel" , ( ) => {
6
- test ( "should work when given a valid integer number" , async ( ) => {
5
+ it ( "should work when given a valid integer number" , async ( ) => {
7
6
const signer = await getDefaultSigner ( ) ;
8
7
const blockNumber = await signer . provider ?. getBlock ( "latest" ) ;
9
8
10
9
await timeTravel ( { seconds : 5 , signer } ) ;
11
10
12
11
const blockNumberAfter = await signer . provider ?. getBlock ( "latest" ) ;
13
- expect ( blockNumberAfter ! . timestamp ) . toBeGreaterThan ( blockNumber ! . timestamp ) ;
12
+ expect ( blockNumberAfter ! . timestamp ) . to . be . gt ( blockNumber ! . timestamp ) ;
14
13
} ) ;
15
14
} ) ;
You can’t perform that action at this time.
0 commit comments