-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: simpler / more flexible api (#181)
* mock api * mock paraglide adder * improve? api * small tweaks * more tweaks * more * start implementing new api (no clue if it works, requires cleanup) * rename * rename some stuff * migrate eslint * migrate mdsvex * migrate playwright * migrate prettier * delete routify * update storybook * update tailwindcss * migrate vitest * migrate drizzle * migrate lucia * exract `dependsOn` into seperate function * cleanup * migrate community adder * try out `setup` api, without actually implementing it * skip writing empty files * make `setup` function work * rename dir because vitest hates us * dont expose `options` * simplify * pm * remove old tests * initial install helper impl * ignores * add initial tests * ..pin storybook * fix scripts * add storybook test * simplify * deps * add retries * not needed * tweak community template * add fixtures * community template tests * naming * tweaks * unneeded * clean * lockfile trickery * fix eslint test * fix paraglide * tweak workflow * ... * fix lint * fix check * simplify * simplify * upgrade vitest * fix nit * fix lint * simplify * cleanup * rename `vi` to `vitest` * windows fixes * more windows annoyances * tweaks * add `test:ui` script * `tinyexec` `throwOnError: true` * revert * properly terminate child processes * dont skip storybook * cleanup on failure to load the page * unused * newline * use vitest workspaces * add `try-catch` while killing processes * increase navigation timeout * apply merge changes * fix timeout * add retries * remove storybook log * cleanup cli package * simplify * fix lucia tests * dont print external command output while testing * fix storybook * fixes * format before evaluating test * fix dir path * setup matrix * skip running docker containers outside of linux runners * print console output? * fix lint? * force `npm` for storybook? * Revert "force `npm` for storybook?" This reverts commit ef2df6e. * try latest * Revert "try latest" This reverts commit 1c095d6. * Revert "print console output?" This reverts commit 9d5b6b2. * skip runnung storybook tests in ci on windows * improve * missing filename * enhance tests * pipe stdio during tests * skip storybook * fixes * fix test * fix: apply defaults to unspecified options * unpin storybook and remove skipping windows ci * use `defineProject` instead for better type safety in a workspace * remove silent flag * use latest * temp log * unwrap * clear cache and log cause * move it along * run sequentially * revert * test * exclude windows from running concurrently * tweaks * dont return string from `file` function * improve `unsupported` * log `stderr` on failed dep installs * tweak error * simplify * fixes and tweaks * fix --------- Co-authored-by: AdrianGonz97 <[email protected]>
- Loading branch information
1 parent
674cb58
commit 9da497f
Showing
31 changed files
with
1,434 additions
and
1,576 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
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,30 @@ | ||
import process from 'node:process'; | ||
import { expect } from '@playwright/test'; | ||
import { setupTest } from '../_setup/suite.ts'; | ||
import { officialAdders } from '../../index.ts'; | ||
import type { AddonMap, OptionMap } from 'sv'; | ||
|
||
const windowsCI = process.env.CI && process.platform === 'win32'; | ||
const addons = officialAdders.reduce<AddonMap>((addonMap, addon) => { | ||
if (addon.id === 'storybook' && windowsCI) return addonMap; | ||
addonMap[addon.id] = addon; | ||
return addonMap; | ||
}, {}); | ||
|
||
const defaultOptions = officialAdders.reduce<OptionMap<typeof addons>>((options, addon) => { | ||
options[addon.id] = {}; | ||
return options; | ||
}, {}); | ||
|
||
const { test, variants, prepareServer } = setupTest(addons); | ||
|
||
const kitOnly = variants.filter((v) => v.startsWith('kit')); | ||
test.concurrent.for(kitOnly)('run all addons - %s', async (variant, { page, ...ctx }) => { | ||
const cwd = await ctx.run(variant, defaultOptions); | ||
|
||
const { close } = await prepareServer({ cwd, page }); | ||
// kill server process when we're done | ||
ctx.onTestFinished(async () => await close()); | ||
|
||
expect(true).toBe(true); | ||
}); |
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
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
Oops, something went wrong.