kempo-testing-framework 1.4.3 → 1.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kempo-testing-framework",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
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.3.11",
18
+ "kempo-css": "^1.3.13",
19
19
  "puppeteer": "^24.9.0"
20
20
  },
21
21
  "repository": {
@@ -1,105 +0,0 @@
1
- # Code Contribution Guidelines
2
-
3
- ## Project Structure
4
-
5
- - All code should be in the `src/` directory, with the exception of index.js.
6
- - All utility function module files should be in the `src/utils/` directory.
7
-
8
- ### GUI
9
-
10
- All files served by the GUI should be in the `gui/` directory, with the exception of scripts shared with the CLI, custom endpoints, and node_modules like kempo.css (which should have custom endpoints).
11
-
12
- ## Coding Style Guidelines
13
-
14
- ### Code Organization
15
- Use multi-line comments to separate code into logical sections. Group related functionality together.
16
- - Example: In Lit components, group lifecycle callbacks, event handlers, public methods, utility functions, and rendering logic separately.
17
-
18
- ```javascript
19
- /*
20
- Lifecycle Callbacks
21
- */
22
- ```
23
-
24
- ### Avoid single-use variables/functions
25
- Avoid defining a variable or function to only use it once; inline the logic where needed. Some exceptions include:
26
- - recursion
27
- - scope encapsulation (IIFE)
28
- - context changes
29
-
30
- ### Minimal Comments, Empty Lines, and Spacing
31
-
32
- Use minimal comments. Assume readers understand the language. Some exceptions include:
33
- - complex logic
34
- - anti-patterns
35
- - code organization
36
-
37
- Do not put random empty lines within code; put them where they make sense for readability, for example:
38
- - above and below definitions for functions and classes.
39
- - to help break up large sections of logic to be more readable. If there are 100 lines of code with no breaks, it gets hard to read.
40
- - above multi-line comments to indicate the comment belongs to the code below
41
-
42
- No empty lines in css.
43
-
44
- End each file with an empty line.
45
-
46
- End each line with a `;` when possible, even if it is optional.
47
-
48
- Avoid unnecessary spacing, for example:
49
- - after the word `if`
50
- - within parentheses for conditional statements
51
-
52
- ```javascript
53
- let count = 1;
54
-
55
- const incrementOdd = (n) => {
56
- if(n % 2 !== 0){
57
- return n++;
58
- }
59
- return n;
60
- };
61
-
62
- count = incrementOdd(count);
63
- ```
64
-
65
- ### Prefer Arrow Functions
66
- Prefer the use of arrow functions when possible, especially for class methods to avoid binding. Use normal functions if needed for preserving the proper context.
67
- - For very basic logic, use implicit returns
68
- - If there is a single parameter, omit the parentheses.
69
- ```javascript
70
- const addOne = n => n + 1;
71
- ```
72
-
73
- ### Module Exports
74
- - If a module has only one export, use the "default" export, not a named export.
75
- - Do not declare the default export as a const or give it a name; just export the value.
76
-
77
- ```javascript
78
- export default (n) => n + 1;
79
- ```
80
- - If a module has multiple exports, use named exports and do not use a "default" export.
81
-
82
- ### Code Reuse
83
- Create utility functions for shared logic.
84
- - If the shared logic is used in a single file, define a utility function in that file.
85
- - If the shared logic is used in multiple files, create a utility function module file in `src/utils/`.
86
-
87
- ### Naming
88
- Do not prefix identifiers with underscores.
89
- - Never use leading underscores (`_`) for variable, property, method, or function names.
90
- - Use clear, descriptive names without prefixes.
91
- - When true privacy is needed inside classes, prefer native JavaScript private fields (e.g., `#myField`) instead of simulated privacy via underscores.
92
-
93
- ## Lit Components
94
-
95
- ### Component Architecture and Communication
96
-
97
- - Use methods to cause actions; do not emit events to trigger logic. Events are for notifying that something already happened.
98
- - Prefer `el.closest('ktf-test-framework')?.enqueueSuite({...})` over firing an `enqueue` event.
99
-
100
- - Wrap dependent GUI components inside a parent `ktf-test-framework` element. Children find it via `closest('ktf-test-framework')` and call its methods. The framework can query its subtree to orchestrate children.
101
-
102
- - Avoid `window` globals and global custom events for coordination. If broadcast is needed, scope events to the framework element; reserve window events for global, non-visual concerns (e.g., settings changes).
103
-
104
- - Queued status must show the `scheduled` icon. Running may apply `animation="spin"`.
105
-
File without changes
File without changes