0.10.2 • Published 2 years ago

@lucia-sveltekit/adapter-test v0.10.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Tests for adapters for Lucia

Provides tests for creating adapters for Lucia.

interface Database {
    getRefreshTokens: () => Promise<RefreshTokensSchema[]>;
    getUsers: () => Promise<UsersSchema[]>;
    clearRefreshTokens: () => Promise<void>;
    clearUsers: () => Promise<void>;
    insertRefreshToken: (data: RefreshTokensSchema) => Promise<void>;
    insertUser: (data: UsersSchema) => Promise<void>;
}

interface UsersSchema {
    id: string;
    identifier_token: string;
    hashed_password: string | null;
    username: string; // unique, string
    email: string; // unique, string
}

interface RefreshTokensSchema {
    refresh_token: string;
    user_id: string;
}
import { testAdapter } from "@lucia-sveltekit/adapter-test"
import type { Adapter } from "lucia-sveltekit/types"

const db: Database
const adapter: Adapter

testAdapter(adapter, db)
0.10.0

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.8.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago