You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ls # you should see a Clarinet.toml file in the list
125
61
```
126
62
127
-
### Notes:
63
+
Run the following command to setup the testing framework:
128
64
129
-
- This code assumes that you have a contract called `my-contract` with a method `add`.
130
-
```clar
131
-
;; contracts/my-contract.clar
132
-
(define-public (add (n1 uint) (n2 uint))
133
-
(ok (+ n1 n2))
134
-
)
65
+
```sh
66
+
npx @hirosystems/clarinet-sdk
135
67
```
136
68
137
-
- You may need to disable the deno extension if it's activated in `.vscode/settings.json`.
69
+
Visit the [clarity starter project](https://github.com/hirosystems/clarity-starter/tree/170224c9dd3bde185f194a9036c5970f44c596cd)to see the testing framework in action.
138
70
139
71
140
72
### Type checking
141
73
142
-
You can use TypeScript to write test by installing it and setting up the `tsconfig.json`.
We recommend to use TypeScript to write the unit tests, but it's also possible to do it with JavaScript. To do so, rename your test files to `.test.js` instead of `.test.ts`. You can also delete the `tsconfig.json` and uninstall typescript with `npm uninstall typescript`.
174
75
175
-
If you want to write your test in JavaScript but still have a certain level of type safety and autocompletion, VSCode can help you with that. You can create a basic `jsconfig.json` file:
76
+
Note: If you want to write your test in JavaScript but still have a certain level of type safety and autocompletion, VSCode can help you with that. You can create a basic `jsconfig.json` file:
0 commit comments