diff --git a/src/app.css b/src/app.css
index 5934b5a..869e517 100644
--- a/src/app.css
+++ b/src/app.css
@@ -1,6 +1,5 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import 'tailwindcss';
+@config "../tailwind.config.js";
html,
body {
@@ -13,6 +12,7 @@ body {
color: #333;
margin: 0;
box-sizing: border-box;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
+ font-family:
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
'Helvetica Neue', sans-serif;
}
diff --git a/src/core/snake.ts b/src/core/snake.ts
index f5b4642..90a4d71 100644
--- a/src/core/snake.ts
+++ b/src/core/snake.ts
@@ -12,7 +12,6 @@ interface snakeGameOptions {
logger?: (message) => void;
}
-// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {};
export interface SnakeGame {
diff --git a/src/main.ts b/src/main.ts
index 19e2f73..2a7a1de 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,8 +1,7 @@
+import { mount } from 'svelte';
import './app.css';
import App from './App.svelte';
-const app = new App({
- target: document.getElementById('app') as Element,
-});
+const app = mount(App, { target: document.getElementById('app') as Element });
export default app;
diff --git a/vite.config.ts b/vite.config.ts
index 90d3ab7..88aa63f 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,8 +1,9 @@
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
+import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
- plugins: [svelte()],
+ plugins: [tailwindcss(), svelte()],
server: {
// this ensures that the browser opens upon server start
open: true,
diff --git a/vitest.config.js b/vitest.config.js
index b8c99dd..64b55e8 100644
--- a/vitest.config.js
+++ b/vitest.config.js
@@ -1,9 +1,12 @@
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
+import { svelteTesting } from '@testing-library/svelte/vite';
export default defineConfig({
- plugins: [svelte({ hot: !process.env.VITEST })],
+ // eslint-disable-next-line no-undef
+ plugins: [svelte({ hot: !process.env.VITEST }), svelteTesting()],
test: {
+ environment: 'jsdom',
globals: false,
},
});