Skip to content

benmccann/svelte-add-jest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Add Jest to Sveltekit

❓ What is this?

This is an experimental command to run to add Jest to your SvelteKit project.

🛠 Usage

You must start with a fresh copy of the official SvelteKit template, which is currently created by running this command:

npm init svelte@next

Once that is set up, run this command in your project directory to set up Jest:

❗️ When running with TypeScript support enabled, remove comments within tsconfig.json or the adder will fail. This is a known limitation of Preset, as it relies upon JSON.parse.

npx apply rossyman/svelte-add-jest # --no-ssh

After the preset runs,

  • npm install, pnpm i, or yarn to update dependencies.

  • You can apply another Svelte Adder to your project for more functionality.

⚙️ Options

Description Flag Negated Default
Interactive Mode --interaction --no-interaction True
Jest DOM Support --jest-dom --no-jest-dom True
Typescript Support --ts --no-ts False
Generate Example --examples --no-examples True

📑 Relevant Documentation

😵 Help! I have a question

Create an issue and we'll try to help.

😡 Fix! There is something that needs improvement

Create an issue or pull request and we'll try to fix.

These are new tools, so there are likely to be problems in this project. Thank you for bringing them to our attention or fixing them for us.

📄 License

MIT


Repository preview image generated with GitHub Social Preview

This README was generated with ❤️ by readme-md-generator

About

SvelteKit adder for Jest unit testing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 96.3%
  • JavaScript 3.7%