Stting up vitest.
This commit is contained in:
parent
4b952001c3
commit
2387b1a4e9
|
@ -21,7 +21,7 @@
|
||||||
"@capacitor/ios": "^4.6.3",
|
"@capacitor/ios": "^4.6.3",
|
||||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||||
"@solid-primitives/i18n": "^1.1.3",
|
"@solid-primitives/i18n": "^1.1.4",
|
||||||
"@solidjs/router": "^0.7.0",
|
"@solidjs/router": "^0.7.0",
|
||||||
"@suid/icons-material": "^0.5.8",
|
"@suid/icons-material": "^0.5.8",
|
||||||
"@suid/material": "^0.10.1",
|
"@suid/material": "^0.10.1",
|
||||||
|
@ -34,14 +34,15 @@
|
||||||
"ol": "^7.2.2",
|
"ol": "^7.2.2",
|
||||||
"osmtogeojson": "^3.0.0-beta.5",
|
"osmtogeojson": "^3.0.0-beta.5",
|
||||||
"patch-package": "^6.5.1",
|
"patch-package": "^6.5.1",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.1",
|
||||||
"pouchdb-browser": "^8.0.0",
|
"pouchdb-browser": "^8.0.1",
|
||||||
"proj4": "^2.8.1",
|
"proj4": "^2.8.1",
|
||||||
"solid-js": "^1.6.10",
|
"solid-js": "^1.6.10",
|
||||||
"vite-plugin-solid-svg": "^0.6.0"
|
"vite-plugin-solid-svg": "^0.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@capacitor/cli": "^4.6.3",
|
"@capacitor/cli": "^4.6.3",
|
||||||
|
"@solidjs/testing-library": "^0.6.1",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/memoizee": "^0.4.8",
|
"@types/memoizee": "^0.4.8",
|
||||||
|
@ -51,7 +52,6 @@
|
||||||
"license-checker": "^25.0.1",
|
"license-checker": "^25.0.1",
|
||||||
"license-compatibility-checker": "^0.3.5",
|
"license-compatibility-checker": "^0.3.5",
|
||||||
"license-report": "^6.3.0",
|
"license-report": "^6.3.0",
|
||||||
"solid-testing-library": ">=0.5.0",
|
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"vite": ">=4.1.1",
|
"vite": ">=4.1.1",
|
||||||
"vite-plugin-solid": "^2.5.0",
|
"vite-plugin-solid": "^2.5.0",
|
||||||
|
@ -1436,9 +1436,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@solid-primitives/i18n": {
|
"node_modules/@solid-primitives/i18n": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@solid-primitives/i18n/-/i18n-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@solid-primitives/i18n/-/i18n-1.1.4.tgz",
|
||||||
"integrity": "sha512-VbX4FZfIkqIrelFeGC1KgXME4aeS7kiAFb6IhIY7Ey4S+wOSGCiEesIwGeMHxyJ1xk0yCFS5YUVEXcQIBZysVw==",
|
"integrity": "sha512-TKTcwItoL+T0QJCf1W5Hav5Zdl4JKwWWdri34cgBpUEx4eSb5CouH3Mr3kH9cknaETV2oVU9lJObeCoQikLj0w==",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"solid-js": "^1.6.0"
|
"solid-js": "^1.6.0"
|
||||||
}
|
}
|
||||||
|
@ -1451,6 +1451,21 @@
|
||||||
"solid-js": "^1.5.3"
|
"solid-js": "^1.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@solidjs/testing-library": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@solidjs/testing-library/-/testing-library-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-cS91EDopZhpVa+F55vLxbT+xrQEtc6jIYhXEleu7aCtPRKuBAhKGYQoiOAWrxRd2cXu678dhR8kuwp7ZS2gkNQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@testing-library/dom": "^8.20.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"solid-js": ">=1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@suid/base": {
|
"node_modules/@suid/base": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/@suid/base/-/base-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/@suid/base/-/base-0.6.3.tgz",
|
||||||
|
@ -1575,9 +1590,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@testing-library/dom": {
|
"node_modules/@testing-library/dom": {
|
||||||
"version": "8.19.1",
|
"version": "8.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.20.0.tgz",
|
||||||
"integrity": "sha512-P6iIPyYQ+qH8CvGauAqanhVnjrnRe0IZFSYCeGkSRW9q3u8bdVn2NPI+lasFyVsEQn1J/IFmp5Aax41+dAP9wg==",
|
"integrity": "sha512-d9ULIT+a4EXLX3UU8FBjauG9NnsZHkHztXoIcTsOKoOw030fyjheN9svkTULjJxtYag9DZz5Jz5qkWZDPxTFwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
|
@ -6882,9 +6897,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pouchdb": {
|
"node_modules/pouchdb": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-8.0.1.tgz",
|
||||||
"integrity": "sha512-VYaPQ1CPTNjZ+Ltm/pl4llaDMTRCZrpg7TZ/2BpeA8RrawE66CRW7aGSWzgQarW8j/KHwEz5cVv/mwj9RMnCTg==",
|
"integrity": "sha512-xp5S83JOQn2NAL0ZQ5CU+DI26V9/YrYuVtkXnbGEIDrYiFfj5A8gAcfbxefXb/9O+Qn4n5RaT/19+8UBSZ42sw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"abort-controller": "3.0.0",
|
"abort-controller": "3.0.0",
|
||||||
"buffer-from": "1.1.2",
|
"buffer-from": "1.1.2",
|
||||||
|
@ -6907,9 +6922,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pouchdb-browser": {
|
"node_modules/pouchdb-browser": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/pouchdb-browser/-/pouchdb-browser-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pouchdb-browser/-/pouchdb-browser-8.0.1.tgz",
|
||||||
"integrity": "sha512-ygZa7QPcab9Rz+gkhJfc+XM1H932FhMurrbjIGC6/RTBOXyN7ZighX6pCxtbju/h5AVXPQQoilJE2O7MYasa0g==",
|
"integrity": "sha512-wXObS1Layd/gBRKwa6EBS99tFY9G3VPaMRu8ffWCohkpi9PZCm3z1xeB4P4S9Qecf0u5so+rxvbVVyTtgdhvaQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"immediate": "3.3.0",
|
"immediate": "3.3.0",
|
||||||
"spark-md5": "3.0.2",
|
"spark-md5": "3.0.2",
|
||||||
|
@ -7615,21 +7630,6 @@
|
||||||
"solid-js": "^1.3"
|
"solid-js": "^1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/solid-testing-library": {
|
|
||||||
"version": "0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/solid-testing-library/-/solid-testing-library-0.5.0.tgz",
|
|
||||||
"integrity": "sha512-vr4Ke9Dq3bUFLaXOcN8/IVn2e9Q37w4vdmoIOmFBIPs7iCJX9IxuC0IdQqK8nzBZMQqceijkfyCE3Qc407KmaA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@testing-library/dom": "^8.19.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"solid-js": ">=1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sort-asc": {
|
"node_modules/sort-asc": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.1.0.tgz",
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@capacitor/cli": "^4.6.3",
|
"@capacitor/cli": "^4.6.3",
|
||||||
|
"@solidjs/testing-library": "^0.6.1",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/memoizee": "^0.4.8",
|
"@types/memoizee": "^0.4.8",
|
||||||
|
@ -23,7 +24,6 @@
|
||||||
"license-checker": "^25.0.1",
|
"license-checker": "^25.0.1",
|
||||||
"license-compatibility-checker": "^0.3.5",
|
"license-compatibility-checker": "^0.3.5",
|
||||||
"license-report": "^6.3.0",
|
"license-report": "^6.3.0",
|
||||||
"solid-testing-library": ">=0.5.0",
|
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"vite": ">=4.1.1",
|
"vite": ">=4.1.1",
|
||||||
"vite-plugin-solid": "^2.5.0",
|
"vite-plugin-solid": "^2.5.0",
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"@capacitor/ios": "^4.6.3",
|
"@capacitor/ios": "^4.6.3",
|
||||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||||
"@solid-primitives/i18n": "^1.1.3",
|
"@solid-primitives/i18n": "^1.1.4",
|
||||||
"@solidjs/router": "^0.7.0",
|
"@solidjs/router": "^0.7.0",
|
||||||
"@suid/icons-material": "^0.5.8",
|
"@suid/icons-material": "^0.5.8",
|
||||||
"@suid/material": "^0.10.1",
|
"@suid/material": "^0.10.1",
|
||||||
|
@ -54,8 +54,8 @@
|
||||||
"ol": "^7.2.2",
|
"ol": "^7.2.2",
|
||||||
"osmtogeojson": "^3.0.0-beta.5",
|
"osmtogeojson": "^3.0.0-beta.5",
|
||||||
"patch-package": "^6.5.1",
|
"patch-package": "^6.5.1",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.1",
|
||||||
"pouchdb-browser": "^8.0.0",
|
"pouchdb-browser": "^8.0.1",
|
||||||
"proj4": "^2.8.1",
|
"proj4": "^2.8.1",
|
||||||
"solid-js": "^1.6.10",
|
"solid-js": "^1.6.10",
|
||||||
"vite-plugin-solid-svg": "^0.6.0"
|
"vite-plugin-solid-svg": "^0.6.0"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { describe, it } from 'vitest';
|
||||||
|
|
||||||
|
describe('putNewGpx', () => {
|
||||||
|
it("doesn't return an error", () => {});
|
||||||
|
});
|
|
@ -64,7 +64,7 @@ const compactRteOrTrkseg = (params: any) => {
|
||||||
export const compactRteOrTrksegDebounced = debounceByParam(
|
export const compactRteOrTrksegDebounced = debounceByParam(
|
||||||
compactRteOrTrkseg,
|
compactRteOrTrkseg,
|
||||||
property('id'),
|
property('id'),
|
||||||
3600000 * (1 + Math.random())
|
60 * 60 * 1000 * (1 + Math.random())
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getRteDocs: ({
|
export const getRteDocs: ({
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
/// <reference types="vitest" />
|
||||||
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import solidPlugin from 'vite-plugin-solid';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [solidPlugin()],
|
||||||
|
server: {
|
||||||
|
port: 3000,
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
environment: 'jsdom',
|
||||||
|
globals: true,
|
||||||
|
transformMode: { web: [/\.[jt]sx?$/] },
|
||||||
|
setupFiles: ['node_modules/@testing-library/jest-dom/extend-expect.js'],
|
||||||
|
// otherwise, solid would be loaded twice:
|
||||||
|
deps: { registerNodeLoader: true },
|
||||||
|
// if you have few tests, try commenting one
|
||||||
|
// or both out to improve performance:
|
||||||
|
threads: false,
|
||||||
|
isolate: false,
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
target: 'esnext',
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
conditions: ['development', 'browser'],
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in New Issue