Add runnable support for Deno.test (#34593)
example of detected code: ```ts Deno.test("t", () => { console.log("Hello, World!"); }); Deno.test(function azaz() { console.log("Hello, World!"); }); ``` I can't build zed locally so I didn't test this, but I think the code is straightforward enough, hopefully someone else can verify it Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
109eddafd0
commit
d2ef287791
2 changed files with 74 additions and 1 deletions
|
@ -57,6 +57,40 @@ See [Configuring supported languages](../configuring-languages.md) in the Zed do
|
|||
TBD: Deno Typescript REPL instructions [docs/repl#typescript-deno](../repl.md#typescript-deno)
|
||||
-->
|
||||
|
||||
## DAP support
|
||||
|
||||
To debug deno programs, add this to `.zed/debug.json`
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"adapter": "JavaScript",
|
||||
"label": "Deno",
|
||||
"request": "launch",
|
||||
"type": "pwa-node",
|
||||
"cwd": "$ZED_WORKTREE_ROOT",
|
||||
"program": "$ZED_FILE",
|
||||
"runtimeExecutable": "deno",
|
||||
"runtimeArgs": ["run", "--allow-all", "--inspect-wait"],
|
||||
"attachSimplePort": 9229
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Runnable support
|
||||
|
||||
To run deno tasks like tests from the ui, add this to `.zed/tasks.json`
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"label": "deno test",
|
||||
"command": "deno test -A --filter '/^$ZED_CUSTOM_DENO_TEST_NAME$/' $ZED_FILE",
|
||||
"tags": ["js-test"]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## See also:
|
||||
|
||||
- [TypeScript](./typescript.md)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue