-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: conditionally include
.vscode
and test/_fixtures
, styling f…
…ixes
- Loading branch information
1 parent
a94a6f0
commit 0011da2
Showing
11 changed files
with
110 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"sculpt0r.vsc-ava-test-runner", | ||
"samverschueren.linter-xo", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"xo.enable": true, | ||
"xo.format.enable": true, | ||
"xo.overrideSeverity": "warn", | ||
"xo.debounce": 100, | ||
"[javascript]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "samverschueren.linter-xo" | ||
}, | ||
"[typescript]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "samverschueren.linter-xo" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"test.todo": { | ||
"scope": "typescript", | ||
"prefix": "todo", | ||
"description": "Create an AVA todo test", | ||
"body": "test.todo(\"$1\");", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import process from "node:process"; | ||
import anyTest, { type TestFn } from "ava"; | ||
import { Semaphore, type Permit } from "@shopify/semaphore"; | ||
import { execa } from "execa"; | ||
import { getBinPath } from "get-bin-path"; | ||
import { isExecutable } from "is-executable"; | ||
import { atFixture } from "./_utils.js"; | ||
|
||
const test = anyTest as TestFn<{ | ||
binPath: string; | ||
permit: Permit; | ||
}>; | ||
|
||
test.before("setup context", async t => { | ||
const binPath = await getBinPath(); | ||
t.truthy(binPath, "No bin path found!"); | ||
|
||
t.context.binPath = binPath!.replace("dist", "src").replace(".js", ".ts"); | ||
t.true(await isExecutable(t.context.binPath), "Source binary not executable!"); | ||
}); | ||
|
||
// https://github.com/avajs/ava/discussions/3177 | ||
const semaphore = new Semaphore(Number(process.env["concurrency"]) || 5); | ||
|
||
test.beforeEach("setup concurrency", async t => { | ||
t.context.permit = await semaphore.acquire(); | ||
}); | ||
|
||
test.afterEach.always(async t => { | ||
await t.context.permit.release(); | ||
}); | ||
|
||
test("main", async t => { | ||
const {exitCode} = await execa(t.context.binPath); | ||
|
||
t.is(exitCode, 0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters