Closed Reblixt closed 1 month ago
Thanks for creating the issue, I will get this fixed after the weekend!
Just started digging into this.
I got the tests running by:
import '@types/jest'
from the spec - I did not replace it with import 'jest'
.typeRoots
key from anchor/tsconfig.json
.With these changes, the tests run. I do still see similar errors when I open the project in nvim, strangely enough WebStorm and VS Code don't show them.
I'll keep digging into this, but the above 2 steps might unblock you.
I've made the above changes (and a bunch more) in the relevant template and set up a GitHub Actions workflow to make sure the tests run on CI.
I hope this fixes the issues with newly created projects. If it doesn't, don't hesitate to ping me here and I'll re-open the issue investigate further.
This happends now when i create a new npx create-solana-dapp
and do these commands in the followoing order:
if i do as the complier suggested. remove import @types/jest and add import 'jest'; then the test works but... my editor looks like this instead. a wall of syntax error on every ( describe, it, expect)
I have tried to have both import "@types/jest"; import "jest";
Imported but the test fails anyway because of the import.
My setup