@thyn/vite-plugin 0.0.86 → 0.0.88

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": "@thyn/vite-plugin",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "pub": "tsc && npm version patch -f && npm -f publish --access=public",
@@ -26,7 +26,7 @@
26
26
  "typescript": "^5.8.3"
27
27
  },
28
28
  "devDependencies": {
29
- "@thyn/core": "^0.0.43",
29
+ "@thyn/core": "^0.0.87",
30
30
  "@types/jsdom": "^21.1.7",
31
31
  "vite": "^7.0.0",
32
32
  "vitest": "^3.2.4"
@@ -4,10 +4,18 @@ import List from "./List.thyn";
4
4
  describe("List component", () => {
5
5
  it("appends on click", async () => {
6
6
  const root = List();
7
- expect(root.textContent).toBe("012");
7
+ expect(root.textContent).toBe("start012end");
8
8
  root.click();
9
9
  await Promise.resolve();
10
10
  await Promise.resolve();
11
- expect(root.textContent).toBe("0123");
11
+ expect(root.textContent).toBe("start0123end");
12
+ root.click();
13
+ await Promise.resolve();
14
+ await Promise.resolve();
15
+ expect(root.textContent).toBe("startend");
16
+ // root.click();
17
+ // await Promise.resolve();
18
+ // await Promise.resolve();
19
+ // expect(root.textContent).toBe("start0end");
12
20
  });
13
21
  });
package/tests/List.thyn CHANGED
@@ -2,8 +2,14 @@
2
2
  const items = $signal([0, 1, 2]);
3
3
  </script>
4
4
 
5
- <div onclick={() => items(v => [...v, v.length])}>
5
+ <div onclick={() => items(v => v.length === 4 ? [] : [...v, v.length])}>
6
+ <p>
7
+ start
8
+ </p>
6
9
  <p #for={item in items()}>
7
10
  {{ item }}
8
11
  </p>
12
+ <p>
13
+ end
14
+ </p>
9
15
  </div>