CHORE: WIP unit test
All checks were successful
Run Unit and Integration Tests / test (push) Successful in 59s

This commit is contained in:
Luke Else 2025-06-07 18:26:15 +01:00
parent 2a1cbb8be3
commit 2c5d3c04d0
4 changed files with 27 additions and 10 deletions

View File

@ -1,4 +1,6 @@
export async function getJson(path: string) {
import type {ContentTemplate} from "$lib/types"
export async function getJson(path: string): Promise<ContentTemplate> {
let response = await fetch(path);
let users = await response.json();
return users;

View File

@ -1,10 +1,28 @@
export type TimelinePosition = 'right' | 'left' | 'alternate';
export interface ContentTemplate {
name: string;
job_title: string;
location: string;
profile_photo: string;
about: string;
export type ParentPosition = 'right' | 'left';
skills: Skill[];
timeline: TimelineEvent[];
}
export type TimelineConfig = {
rootPosition: TimelinePosition;
};
export interface Skill {
name: string;
logo: string;
colour: string;
link: string;
about: string;
competency: number;
}
export interface TimelineEvent {
duration: string;
title: string;
description: string;
}
export interface GitRepo {
name: string;

View File

@ -3,8 +3,5 @@ import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [
tailwindcss(),
sveltekit(),
]
plugins: [tailwindcss(), sveltekit()],
});