Skip to content

Commit 3fd61b0

Browse files
committed
test: updated tests with new approach
1 parent f38ceae commit 3fd61b0

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

packages/jacaranda/src/index.test.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { describe, it, expect } from 'vitest';
2-
import { styles, defineTokens } from './';
2+
import { defineTokens } from './';
33

44
describe('sva', () => {
55
it('should return base styles when no variants are provided', () => {
6-
const baseStyles = styles({
6+
const { sva } = defineTokens({});
7+
const baseStyles = sva({
78
base: { display: 'flex' },
89
variants: {},
910
});
@@ -12,7 +13,8 @@ describe('sva', () => {
1213
});
1314

1415
it('should apply variant styles correctly', () => {
15-
const buttonStyles = styles({
16+
const { sva } = defineTokens({});
17+
const buttonStyles = sva({
1618
base: { display: 'flex' },
1719
variants: {
1820
visual: {
@@ -36,7 +38,8 @@ describe('sva', () => {
3638
});
3739

3840
it('should apply default variants when props are not provided', () => {
39-
const buttonStyles = styles({
41+
const { sva } = defineTokens({});
42+
const buttonStyles = sva({
4043
base: { display: 'flex' },
4144
variants: {
4245
visual: {
@@ -56,7 +59,8 @@ describe('sva', () => {
5659
});
5760

5861
it('should apply compound variants correctly', () => {
59-
const buttonStyles = styles({
62+
const { sva } = defineTokens({});
63+
const buttonStyles = sva({
6064
base: { display: 'flex' },
6165
variants: {
6266
visual: {
@@ -85,7 +89,8 @@ describe('sva', () => {
8589
});
8690

8791
it('should override default variants with provided props', () => {
88-
const buttonStyles = styles({
92+
const { sva } = defineTokens({});
93+
const buttonStyles = sva({
8994
base: { display: 'flex' },
9095
variants: {
9196
visual: {
@@ -105,7 +110,8 @@ describe('sva', () => {
105110
});
106111

107112
it('should handle invalid variant values gracefully', () => {
108-
const buttonStyles = styles({
113+
const { sva } = defineTokens({});
114+
const buttonStyles = sva({
109115
base: { display: 'flex' },
110116
variants: {
111117
visual: {

0 commit comments

Comments
 (0)