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
If your script throws a new error to stop execution, you can catch that error in the results object. The error is stored in the `thrownErrors` property of the results object:
247
+
248
+
```js
249
+
it('throws an error', async () => {
250
+
const { thrownError } =awaitrunAirtableScript({
251
+
script:`
252
+
throw new Error('This is an error')
253
+
`,
254
+
base: testBase,
255
+
})
256
+
expect(thrownError.message).toEqual('This is an error')
257
+
})
258
+
```
259
+
244
260
## Developing locally
245
261
246
262
The environment variable `JEST_AIRTABLE_TS_DEV` should be set to `true` so that the `runScript` function pulls the compiled SDK mock from the `./src/environment/sdk/__sdk.js` file. This is already set to `true` in the `package.json` file.
0 commit comments