Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Aug 29, 2024
1 parent 1337f97 commit d850fc6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/account/BaseSmartContractAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export abstract class BaseSmartContractAccount<
return this.entryPointAddress
}

async isAccountDeployed(forceFetch = false): Promise<boolean> {
async isAccountDeployed(): Promise<boolean> {
return (await this.getDeploymentState()) === DeploymentState.DEPLOYED
}

Expand Down
10 changes: 5 additions & 5 deletions tests/src/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @biconomy/sdk Testing Guide
# @biconomy/sdk Testing Framework

## Testing Setup

Expand Down Expand Up @@ -35,11 +35,11 @@ To prevent tests from conflicting with one another, networks can be scoped at th
- Tests within the same file using a local network may conflict with each other. If needed, split tests into separate files or use the Test Scope.

### Test Scope
- A network is spun up *only* for the individual test in which it is used. Access this via the `isolatedTest` helper in the same file as `"COMMON_LOCALHOST"` or `"FILE_LOCALHOST"` network types.
- A network is spun up *only* for the individual test in which it is used. Access this via the `localhostTest` helper in the same file as `"COMMON_LOCALHOST"` or `"FILE_LOCALHOST"` network types.

Example usage:
```typescript
isolatedTest("should be used in the following way", async({ config: { bundlerUrl, chain, fundedClients }}) => {
localhostTest("should be used in the following way", async({ config: { bundlerUrl, chain, fundedClients }}) => {
// chain, bundlerUrl spun up just in time for this test only...
expect(await fundedClients.smartAccount.getAccountAddress()).toBeTruthy();
});
Expand All @@ -57,9 +57,9 @@ isolatedTest("should be used in the following way", async({ config: { bundlerUrl

Example usage:
```typescript
testnetTest("should be used in the following way", async({ config: { bundlerUrl, chain, fundedClients }}) => {
testnetTest("should be used in the following way", async({ config: { bundlerUrl, chain, account }}) => {
// chain, bundlerUrl etc taken from environment variables...
expect(await fundedClients.smartAccount.getAccountAddress()).toBeTruthy();
expect(account).toBeTruthy(); // from private key, please ensure it is funded if sending txs
});
```

Expand Down
2 changes: 1 addition & 1 deletion tests/src/testSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type NetworkConfigWithTestClients = NetworkConfigWithBundler & {
fundedTestClients: FundedTestClients
}

export const isolatedTest = test.extend<{
export const localhostTest = test.extend<{
config: NetworkConfigWithTestClients
}>({
// biome-ignore lint/correctness/noEmptyPattern: Needed in vitest :/
Expand Down

0 comments on commit d850fc6

Please sign in to comment.