Files
skeleton/packages/skeleton/src/lib/components/Stepper/Step.test.ts
CokaKoala a521d89fd1 chore: add changesets (#1556)
* added scripts and deps

* added version script for dev tag release

* added action scripts

* ignore dist and .temp files

* added changeset config

* format + lint

* dont need that

* simple cache

* reverting back, this cache was more consistent

* changed names

* repo check

* ignore empty arrow functions

* fixed lint errors

* added action to lint on PRs

* added CSA

* lockfile

* update tw-settings.json after publish

* ignore tw-settings.json in prettier

* weird spacing that was breaking the ingore

* added ignore path

* ignore .vercel dir during formatting/linting

* fixed line dupe on format

* fix linting errors

* fixed svelte check errors

* added VERCEL_ENV for svelte-check

* run both lint and check in parallel
2023-05-25 13:17:31 -04:00

27 lines
739 B
TypeScript

import { render } from '@testing-library/svelte';
import { describe, it, expect } from 'vitest';
import { writable, type Writable } from 'svelte/store';
import Step from '$lib/components/Stepper/Step.svelte';
const mockState: Writable<any> = writable({ current: 1, total: 1 }); // NOTE: current/total must match!
describe('Step.svelte', () => {
it('Renders with mininal props', async () => {
const { getByTestId } = render(Step, { props: { state: mockState, index: 0 } });
expect(getByTestId('step')).toBeTruthy();
});
it('Renders with all props', () => {
const { getByTestId } = render(Step, {
props: {
state: mockState,
index: 0,
locked: false
}
});
expect(getByTestId('step')).toBeTruthy();
});
});