Add project configuration files.

This commit is contained in:
Bauke 2022-12-22 13:50:12 +01:00
parent 0d8f2106ff
commit 7c0c1e1e9c
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
6 changed files with 4673 additions and 0 deletions

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# @holllo/test
> **Tiny testing library designed to run anywhere.**
## Example
```ts
import {setup} from "@holllo/test";
const add = (a: number, b: number): number => a + b;
void setup("add", async (group) => {
group.test("1 + 1", async (test) => {
test.equals(add(1, 1), 2);
});
group.test("2 + 2", async (test) => {
test.equals(add(2, 2), 5);
});
});
```
```txt
# add
- 1 + 1 passed
- 2 + 2 failed
Failed equals assertion
| Actual: 4
| Expected: 5
```
## License
Distributed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license, see [LICENSE](https://git.bauke.xyz/Holllo/test/src/branch/main/LICENSE) for more information.

14
esbuild.ts Normal file
View File

@ -0,0 +1,14 @@
import {build} from "esbuild";
await build({
bundle: true,
entryPoints: ["source/index.ts"],
format: "esm",
logLevel: "info",
minify: true,
outdir: "build",
platform: "browser",
splitting: false,
target: ["es2022"],
treeShaking: true,
});

38
package.json Normal file
View File

@ -0,0 +1,38 @@
{
"name": "@holllo/test",
"description": "Tiny testing library designed to run anywhere.",
"license": "AGPL-3.0-or-later",
"version": "0.0.0",
"homepage": "https://git.bauke.xyz/Holllo/test",
"bugs": "https://github.com/Holllo/test/issues",
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"files": [
"build/"
],
"scripts": {
"build": "tsx esbuild.ts && tsc",
"dev": "vite",
"lint": "xo",
"test": "pnpm run build && tsx tests/index.ts && tsx tests/example.ts"
},
"devDependencies": {
"@bauke/eslint-config": "^0.1.2",
"@bauke/prettier-config": "^0.1.2",
"esbuild": "^0.16.10",
"tsx": "^3.12.1",
"typescript": "^4.9.4",
"vite": "^4.0.2",
"xo": "^0.53.1"
},
"prettier": "@bauke/prettier-config",
"xo": {
"extends": "@bauke/eslint-config",
"prettier": true,
"space": true
}
}

4564
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

16
tsconfig.json Normal file
View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"esModuleInterop": true,
"module": "ES2022",
"moduleResolution": "Node",
"outDir": "build",
"skipLibCheck": true,
"strict": true,
"target": "ES2022"
},
"include": [
"source"
]
}

7
vite.config.ts Normal file
View File

@ -0,0 +1,7 @@
import {defineConfig} from "vite";
const relative = (path: string) => new URL(path, import.meta.url).pathname;
export default defineConfig({
root: relative("tests"),
});