-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
105 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['custom'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { PlaywrightTestConfig } from '@playwright/test'; | ||
|
||
const config: PlaywrightTestConfig = { | ||
webServer: { | ||
command: 'npm run build && npm run preview', | ||
port: 4173 | ||
}, | ||
testDir: 'tests', | ||
testMatch: /(.+\.)?(test|spec)\.[jt]s/ | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
/// <reference types="@sveltejs/kit" /> | ||
|
||
// See https://kit.svelte.dev/docs/types#app | ||
// for information about these interfaces | ||
// and what to do when importing types | ||
declare namespace App { | ||
// interface Locals {} | ||
// interface Platform {} | ||
// interface Session {} | ||
// interface Stuff {} | ||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { describe, it, expect } from 'vitest'; | ||
|
||
describe('sum test', () => { | ||
it('adds 1 + 2 to equal 3', () => { | ||
expect(1 + 2).toBe(3); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// place files you want to import through the `$lib` alias in this folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
import adapter from '@sveltejs/adapter-auto'; | ||
import preprocess from 'svelte-preprocess'; | ||
import adapterNode from '@sveltejs/adapter-node'; | ||
import adapterAuto from '@sveltejs/adapter-auto'; | ||
import { vitePreprocess } from '@sveltejs/kit/vite'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
// Consult https://github.com/sveltejs/svelte-preprocess | ||
extensions: ['.svelte'], | ||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors | ||
// for more information about preprocessors | ||
preprocess: preprocess(), | ||
preprocess: [vitePreprocess()], | ||
|
||
vitePlugin: { | ||
inspector: true | ||
}, | ||
kit: { | ||
adapter: adapter() | ||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. | ||
// If your environment is not supported or you settled on a specific environment, switch out the adapter. | ||
// See https://kit.svelte.dev/docs/adapters for more information about adapters. | ||
adapter: process.env.VERCEL ? adapterAuto() : adapterNode(), | ||
prerender: { crawl: false }, // FIXME: remove after all links are corrected. | ||
output: { | ||
preloadStrategy: 'preload-mjs' | ||
}, | ||
version: { | ||
name: process.env.npm_package_version | ||
} | ||
} | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('index page has expected h1', async ({ page }) => { | ||
await page.goto('/'); | ||
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
{ | ||
"extends": "./.svelte-kit/tsconfig.json", | ||
"compilerOptions": { | ||
"lib": ["es2022", "webworker"], | ||
"allowJs": true, | ||
"checkJs": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"strict": true | ||
"strict": true, | ||
"types": [ | ||
"vitest/globals", | ||
"vitest/importMeta", | ||
"@testing-library/jest-dom", | ||
"vite-plugin-pwa/client" | ||
], | ||
"rootDirs": [".", "./.svelte-kit/types", "./$houdini/types"] | ||
} | ||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias | ||
// | ||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes | ||
// from the referenced tsconfig.json - TypeScript does not merge them in | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { sveltekit } from '@sveltejs/kit/vite'; | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
plugins: [sveltekit()], | ||
test: { | ||
include: ['src/**/*.{test,spec}.{js,ts}'] | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { defaultExclude, defineProject, mergeConfig } from 'vitest/config'; | ||
import configShared from '../../vitest.config'; | ||
|
||
export default mergeConfig( | ||
configShared, | ||
defineProject({ | ||
test: { | ||
exclude: [...defaultExclude, '**/tests/mocks/**'] | ||
} | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters