svelte-lab Svelte Themes

Svelte Lab

Exploring Svelte UI Framework with TDD

Exploring Svelte UI Framework with TDD

This is an attempt to explore and/or create suitable tooling to achieve a development workflow with Svelte in a TDD fashion.

It aims to use the following technologies:

Quickstart

To run the lab and see the compiled output:

git clone [email protected]:simon-ohara/svelte-lab.git
cd svelte-lab
npm i && npm start

Visit: http://localhost:8080

Development

During development the test runner should be run in watch mode:

npm run test:watch

This will watch everything (including .svelte files) in the src/ directory and all spec files in the test/ directory.

Modules from the src/ should be imported using the @/ prefix:

import MySvelteComponent from '@/path/inside/src/my-svelte-component.svelte'
import MyTSModule from '@/path/inside/src/my-ts-module' // note no extension
import MyESModule from '@/path/inside/src/my-es-module' // note no extension

The test runner will re-run when any of the files inside the two direcotries change.

Top categories

Loading Svelte Themes