Skip to content

Instantly share code, notes, and snippets.

@franciscoaguirre
Created January 7, 2025 19:02
Show Gist options
  • Select an option

  • Save franciscoaguirre/335396597686f3eb70ea43403e122ed5 to your computer and use it in GitHub Desktop.

Select an option

Save franciscoaguirre/335396597686f3eb70ea43403e122ed5 to your computer and use it in GitHub Desktop.
Polkadot API error with vitest and bun
import { describe, test, expect } from 'vitest';
import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider/web';
describe('some context', () => {
const client = createClient(getWsProvider("wss://westend-penpal-rpc.polkadot.io"));
test('some test', () => {
expect(1).toBeGreaterThan(0);
});
});
{
"name": "testing-vitest-and-bun",
"module": "index.ts",
"scripts": {
"test": "vitest"
},
"type": "module",
"devDependencies": {
"vitest": "^2.1.8"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"polkadot-api": "^1.8.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment