Skip to content

vinpogo/component-testing-recipe

Repository files navigation

Component testing recipe

A structure to follow when writing component tests to facilitate onboarding, readability and maintenance of tests.

Getting Started

This project uses devbox to manage its development environment.

Install devbox:

curl -fsSL https://get.jetpack.io/devbox | bash

Start the devbox shell:

devbox shell

Run a script in the devbox environment:

devbox run <script>

Scripts

Scripts are custom commands that can be run using this project's environment. This project has the following scripts:

Shell Init Hook

The Shell Init Hook is a script that runs whenever the devbox environment is instantiated. It runs on devbox shell and on devbox run.

test -z $DEVBOX_COREPACK_ENABLED || corepack enable --install-directory "/home/nixos/vue-meetup/component-testing-recipe/.devbox/virtenv/nodejs_20/corepack-bin/"
test -z $DEVBOX_COREPACK_ENABLED || export PATH="/home/nixos/vue-meetup/component-testing-recipe/.devbox/virtenv/nodejs_20/corepack-bin/:$PATH"

Packages

Script Details

devbox run install

pnpm install $@

devbox run test

pnpm test $@

About

A recipe for testing components, showcased using vue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published