create-foldkit-app 0.5.13 → 0.5.15

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": "create-foldkit-app",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "Create Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -97,7 +97,7 @@ Even after extracting some sections to their own files (e.g. `message.ts`), the
97
97
 
98
98
  Test update functions with `foldkit/test`. Since update is pure — `(Model, Message) → [Model, Commands]` — tests run without a runtime, DOM, or side effects.
99
99
 
100
- Use `Test.story` to chain steps into a readable narrative: set initial Model → send Message → assert → resolve Command → assert again. Every `Command.define` must include result Message schemas so Commands can be resolved in tests.
100
+ Use `Story.story` to chain steps into a readable narrative: set initial Model → send Message → assert → resolve Command → assert again. Use `Scene.scene` for feature-level testing through the view — clicking buttons, typing into inputs, pressing keys — with accessible locators (`Scene.role`, `Scene.label`, `Scene.placeholder`). Every `Command.define` must include result Message schemas so Commands can be resolved in tests.
101
101
 
102
102
  If the `repos/foldkit` submodule is available, study the `.test.ts` files in `repos/foldkit/examples/` for patterns — they cover simple Command resolution, multi-step interactions, and Submodel OutMessage assertions.
103
103
 
@@ -0,0 +1,3 @@
1
+ import { setup } from 'foldkit/test/vitest'
2
+
3
+ setup()
@@ -5,6 +5,6 @@ import { defineConfig } from 'vite'
5
5
  export default defineConfig({
6
6
  plugins: [tailwindcss(), foldkit()],
7
7
  optimizeDeps: {
8
- entries: ['src/main.ts', '!**/repos/**'],
8
+ entries: ['src/main.ts'],
9
9
  },
10
10
  })
@@ -3,6 +3,7 @@ import { defineConfig } from 'vitest/config'
3
3
  export default defineConfig({
4
4
  test: {
5
5
  environment: 'happy-dom',
6
+ setupFiles: ['./src/vitest-setup.ts'],
6
7
  server: {
7
8
  deps: {
8
9
  inline: ['foldkit'],