kempo-testing-framework 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gui/components/SettingCheckbox.js +1 -1
- package/llm.txt +61 -0
- package/package.json +2 -2
|
@@ -34,7 +34,7 @@ window.customElements.define('ktf-setting-checkbox', class extends LitElement {
|
|
|
34
34
|
const id = `setting-${this.name || 'checkbox'}`;
|
|
35
35
|
return html`
|
|
36
36
|
<div class="d-f mb" style="align-items: center">
|
|
37
|
-
<input id="${id}" type="checkbox"
|
|
37
|
+
<input id="${id}" type="checkbox" .checked=${!!this.checked} @change=${(e) => this.onChange(e)} />
|
|
38
38
|
<label for="${id}" style="line-height: 1.35rem" class="pb0">${this.label || ''}</label>
|
|
39
39
|
</div>
|
|
40
40
|
`;
|
package/llm.txt
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Kempo Testing Framework
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
`npm install kempo-testing-framework --save-dev`
|
|
5
|
+
|
|
6
|
+
## Test File Naming
|
|
7
|
+
- `name.browser-test.js` — browser only
|
|
8
|
+
- `name.node-test.js` — Node only
|
|
9
|
+
- `name.test.js` — both environments
|
|
10
|
+
|
|
11
|
+
Place files anywhere under `tests/` (recursive discovery).
|
|
12
|
+
|
|
13
|
+
## Test File Structure
|
|
14
|
+
```js
|
|
15
|
+
import yourModule from '../src/yourModule.js';
|
|
16
|
+
|
|
17
|
+
// Optional lifecycle exports (all async-capable, receive `log` function)
|
|
18
|
+
export const beforeAll = async (log) => {};
|
|
19
|
+
export const beforeEach = async (log) => {};
|
|
20
|
+
export const afterEach = async (log) => {};
|
|
21
|
+
export const afterAll = async (log) => {};
|
|
22
|
+
|
|
23
|
+
// Optional: custom HTML page for browser tests (path relative to test file)
|
|
24
|
+
export const page = './custom-page.html';
|
|
25
|
+
|
|
26
|
+
// Required: default export is an object of named tests
|
|
27
|
+
export default {
|
|
28
|
+
'test name': ({ pass, fail, log }) => {
|
|
29
|
+
// log(msg) — emit a log message
|
|
30
|
+
// pass(msg) — mark test passed
|
|
31
|
+
// fail(msg) — mark test failed
|
|
32
|
+
pass('ok');
|
|
33
|
+
},
|
|
34
|
+
'async test': async ({ pass, fail, log }) => {
|
|
35
|
+
const result = await yourModule.fn();
|
|
36
|
+
result === 'expected' ? pass('ok') : fail(`got ${result}`);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## CLI
|
|
42
|
+
```
|
|
43
|
+
npx kempo-test # run all tests
|
|
44
|
+
npx kempo-test -b # browser only
|
|
45
|
+
npx kempo-test -n # node only
|
|
46
|
+
npx kempo-test --gui # start web GUI
|
|
47
|
+
npx kempo-test auth # filter files by substring
|
|
48
|
+
npx kempo-test auth login # filter files then tests by substring
|
|
49
|
+
npx kempo-test -b auth login # combined
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Key Flags
|
|
53
|
+
| Flag | Default | Description |
|
|
54
|
+
|------|---------|-------------|
|
|
55
|
+
| `-b` / `--browser` | — | Browser tests only |
|
|
56
|
+
| `-n` / `--node` | — | Node tests only |
|
|
57
|
+
| `-l` / `--log-level` | normal | silent\|minimal\|normal\|verbose\|debug (or 0–4) |
|
|
58
|
+
| `-p` / `--port` | 3000 | Browser test server port |
|
|
59
|
+
| `-w` / `--show-browser` | headless | Show browser window |
|
|
60
|
+
| `-d` / `--delay` | 0 | ms pause before/after browser tests (requires -w) |
|
|
61
|
+
| `-t` / `--timeout` | 30000 | Per-test timeout in ms (min 1000) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kempo-testing-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "The Kempo Testing Framework is a simple testing framework built on the principle that code intended to be ran in the browser should be tested in the browser, code intended to be ran in Node should be tested in Node, and code intended to be ran in both should be tested in both. No mocking, no complexity—just testing.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"kempo-css": "^1.
|
|
18
|
+
"kempo-css": "^2.1.9",
|
|
19
19
|
"puppeteer": "^24.9.0"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|