Skip to content

Commit 4739102

Browse files
test: Add Solid integration tests (#15)
* test: Add solid integration * Add jsdom
1 parent c6b31b6 commit 4739102

25 files changed

Lines changed: 685 additions & 66 deletions

integrations/react/README.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

integrations/react/vite.config.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ import { mergeConfig, defineConfig } from 'vitest/config'
22
import react from '@vitejs/plugin-react'
33
import { tanstackBuildConfig } from '@tanstack/config/build'
44

5+
const config = defineConfig({
6+
plugins: [react()],
7+
test: {
8+
name: 'react-integration',
9+
watch: false,
10+
},
11+
})
12+
513
export default mergeConfig(
14+
config,
615
tanstackBuildConfig({
716
entry: 'src/index.ts',
817
srcDir: 'src',
9-
exclude: ['src/__tests__'],
10-
}),
11-
defineConfig({
12-
plugins: [react()],
13-
test: {
14-
name: 'react',
15-
watch: false,
16-
},
1718
}),
1819
)

integrations/solid/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

integrations/solid/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "solid-integration",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"test:build": "vite build && vitest"
7+
},
8+
"dependencies": {
9+
"solid-js": "^1.8.7"
10+
},
11+
"devDependencies": {
12+
"@tanstack/config": "<1.0.0",
13+
"vite-plugin-solid": "^2.8.0"
14+
}
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
const web = require("solid-js/web");
3+
const solidJs = require("solid-js");
4+
const _tmpl$ = /* @__PURE__ */ web.template(`<h1>Vite + Solid`), _tmpl$2 = /* @__PURE__ */ web.template(`<div class=card><button>count is </button><p>Edit <code>src/App.tsx</code> and save to test HMR`), _tmpl$3 = /* @__PURE__ */ web.template(`<p class=read-the-docs>Click on the Vite and Solid logos to learn more`);
5+
function App() {
6+
const [count, setCount] = solidJs.createSignal(0);
7+
return [_tmpl$(), (() => {
8+
const _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild;
9+
_el$3.firstChild;
10+
_el$3.$$click = () => setCount((count2) => count2 + 1);
11+
web.insert(_el$3, count, null);
12+
return _el$2;
13+
})(), _tmpl$3()];
14+
}
15+
web.delegateEvents(["click"]);
16+
module.exports = App;
17+
//# sourceMappingURL=App.cjs.map

integrations/solid/snap/cjs/App.cjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function App(): import("solid-js").JSX.Element;
2+
export default App;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3+
const App = require("./App.cjs");
4+
exports.App = App;
5+
//# sourceMappingURL=index.cjs.map

integrations/solid/snap/cjs/index.cjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as App } from './App';

0 commit comments

Comments
 (0)