forked from MapComplete/MapComplete
		
	Another step to get tests running
This commit is contained in:
		
							parent
							
								
									071e5bf03a
								
							
						
					
					
						commit
						f9f1a30921
					
				
					 6 changed files with 975 additions and 227 deletions
				
			
		
							
								
								
									
										1186
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										1186
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -129,10 +129,11 @@ | |||
|     "chai": "^4.3.6", | ||||
|     "dependency-cruiser": "^10.4.0", | ||||
|     "fs": "0.0.1-security", | ||||
|     "jsdom": "^21.1.0", | ||||
|     "prettier": "^2.7.1", | ||||
|     "prettier-plugin-svelte": "^2.9.0", | ||||
|     "read-file": "^0.2.0", | ||||
|     "sass": "^1.57.1", | ||||
|     "sass": "^1.58.0", | ||||
|     "sharp": "^0.30.5", | ||||
|     "svelte": "^3.55.1", | ||||
|     "svelte-check": "^3.0.2", | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" | ||||
| 
 | ||||
| export default { | ||||
|   // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
 | ||||
|   // for more information about preprocessors
 | ||||
|  |  | |||
|  | @ -102,7 +102,7 @@ describe("PrepareLayer", () => { | |||
|                     offset: 6, | ||||
|                 }, | ||||
|             ], | ||||
|             titleIcons: [{ render: "defaults", id: "defaults" }], | ||||
|             titleIcons: [{ render: "iconsdefaults", id: "icons.defaults" }], | ||||
|         } | ||||
| 
 | ||||
|         expect(result).toEqual(expected) | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| import { defineConfig } from "vite" | ||||
| import { svelte } from "@sveltejs/vite-plugin-svelte" | ||||
| import autoPreprocess, { scss } from "svelte-preprocess"; | ||||
| import fs from "fs" | ||||
| 
 | ||||
| const allHtmlFiles = fs.readdirSync(".").filter((f) => f.endsWith(".html")) | ||||
|  | @ -18,7 +19,7 @@ export default defineConfig({ | |||
|     }, | ||||
|   }, | ||||
|   base: `${ASSET_URL}`, | ||||
|   plugins: [svelte()], | ||||
|   plugins: [svelte({preprocess: [scss() , autoPreprocess()]})], | ||||
|   server: { | ||||
|     port: 1234, | ||||
|   }, | ||||
|  |  | |||
|  | @ -1,6 +1,11 @@ | |||
| import { defineConfig } from "vitest/config" | ||||
| 
 | ||||
| import { svelte } from '@sveltejs/vite-plugin-svelte' | ||||
| import autoPreprocess from "svelte-preprocess"; | ||||
| export default defineConfig({ | ||||
|     plugins: [ | ||||
|         svelte({ hot: !process.env.VITEST, | ||||
|             preprocess:  [autoPreprocess()] }), | ||||
|     ], | ||||
|     test: { | ||||
|         globals: true, | ||||
|         setupFiles: ["./test/testhooks.ts"], | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue