mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-14 19:57:31 +00:00
feat: add CLI command for importing and exporting Pocket ID data (#998)
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import playwrightConfig from '../playwright.config';
|
||||
|
||||
export async function cleanupBackend(skipSeed = false) {
|
||||
export async function cleanupBackend({ skipSeed = false, skipLdapSetup = false } = {}) {
|
||||
const url = new URL('/api/test/reset', playwrightConfig.use!.baseURL);
|
||||
|
||||
if (process.env.SKIP_LDAP_TESTS === 'true' || skipSeed) {
|
||||
if (process.env.SKIP_LDAP_TESTS === 'true' || skipSeed || skipLdapSetup) {
|
||||
url.searchParams.append('skip-ldap', 'true');
|
||||
}
|
||||
|
||||
|
||||
7
tests/utils/fs.util.ts
Normal file
7
tests/utils/fs.util.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import path from 'path';
|
||||
|
||||
export const tmpDir = pathFromRoot('.tmp');
|
||||
|
||||
export function pathFromRoot(p: string): string {
|
||||
return path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', p);
|
||||
}
|
||||
Reference in New Issue
Block a user