Add project configuration files.
This commit is contained in:
parent
0d8f2106ff
commit
7c0c1e1e9c
|
@ -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.
|
|
@ -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,
|
||||
});
|
|
@ -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
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -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"
|
||||
]
|
||||
}
|
|
@ -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"),
|
||||
});
|
Loading…
Reference in New Issue