Skip to content

Commit c0afc03

Browse files
fix(build): added a smoke test
1 parent 1c35637 commit c0afc03

File tree

5 files changed

+53
-7
lines changed

5 files changed

+53
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup Bun
16+
uses: jarredsumner/setup-bun@v1
17+
18+
- name: Install dependencies
19+
run: bun install
20+
21+
- name: Run tests
22+
run: bun test

bun.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"test": "bun test"
1112
},
1213
"dependencies": {
1314
"@tailwindcss/vite": "^4.1.8",
@@ -22,6 +23,7 @@
2223
"@types/react-dom": "^19.1.2",
2324
"@types/uuid": "^10.0.0",
2425
"@vitejs/plugin-react": "^4.4.1",
26+
"bun-types": "^1.2.15",
2527
"eslint": "^9.25.0",
2628
"eslint-plugin-react-hooks": "^5.2.0",
2729
"eslint-plugin-react-refresh": "^0.4.19",

src/VarManager.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react"
2+
import { renderToString } from "react-dom/server"
3+
import { expect, it } from "bun:test"
4+
import { VarManager } from "../src/VarManager"
5+
6+
it("renders heading without crashing", () => {
7+
const html = renderToString(<VarManager />)
8+
expect(html).toContain("Environment Variable Editor")
9+
})

tsconfig.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
2-
"files": [],
3-
"references": [
4-
{ "path": "./tsconfig.app.json" },
5-
{ "path": "./tsconfig.node.json" }
6-
]
7-
}
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "node",
6+
"jsx": "react-jsx",
7+
"strict": true,
8+
"esModuleInterop": true,
9+
"skipLibCheck": true,
10+
"types": ["bun-types", "node"]
11+
},
12+
"include": ["src", "tests", "src/global.d.ts"]
13+
}

0 commit comments

Comments
 (0)