Skip to content

Commit

Permalink
Fix <IntersectionObserver /> behaviour in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sistrall committed Jan 30, 2024
1 parent 8f7a5ff commit 17a48ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';

const config: UserConfig = {
export default {
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
environment: 'jsdom',
globals: true,
// Carefully see this thread to understand the next lines and
// how they can impact the Svelte IntersectionObserver.
alias: [{ find: /^svelte$/, replacement: 'svelte/internal' }]
}
};

export default config;

0 comments on commit 17a48ce

Please sign in to comment.