Skip to content

Commit

Permalink
Fix Basic Usage code (#883)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondkfcheung authored Feb 10, 2025
1 parent 42128fa commit 3caeeec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ npm install --save-dev @acala-network/chopsticks-testing

```typescript
import { withExpect, setupContext } from '@acala-network/chopsticks-testing';
import { expect } from 'vitest'; // or jest, or other test runners
import { describe, expect, it } from 'vitest'; // or jest, or other test runners

// Create testing utilities with your test runner's expect function
const { check, checkEvents, checkSystemEvents, checkUmp, checkHrmp } = withExpect(expect);

describe('My Chain Tests', () => {
it('should process events correctly', async () => {
const network = setupContext({ endpoint: 'wss://polkadot-rpc.dwellir.com' });
const network = await setupContext({ endpoint: 'wss://polkadot-rpc.dwellir.com' });
// Check and redact system events
await checkSystemEvents(network)
.redact({ number: 2, hash: true })
Expand Down

0 comments on commit 3caeeec

Please sign in to comment.