Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 63ddb3b

Browse files
committed
test((*): add union test and fix test name
1 parent 4449cf4 commit 63ddb3b

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

test/create.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { create } from '../src/core/method/create';
22

3-
test('Style.create returns an object with string values', () => {
3+
test('cssx.create returns an object with string values', () => {
44
const styleObject = {
55
test: {
66
color: 'red',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ test('cssx.root returns undefined', () => {
2020
const result = cssx.root({});
2121
expect(result).toBeUndefined();
2222
});
23+
24+
test('cssx.union returns a string', () => {
25+
const result = cssx.union('test', '', false, undefined);
26+
expect(result).toBe('test');
27+
});

test/global.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { global } from '../src/core/method/global';
22

3-
test('Style.global insert style into the head with data-scope="global"', () => {
3+
test('cssx.global insert style into the head with data-scope="global"', () => {
44
global({
55
h1: {
66
fontSize: 24,

test/root.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { root } from '../src/core/method/root';
22

3-
test('Style.root insert style into the head with data-scope="root"', () => {
3+
test('cssx.root insert style into the head with data-scope="root"', () => {
44
root({
55
'--color-heading': '#333',
66
});

test/set.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { set } from '../src/core/method/set';
22

3-
test('Style.set creates a class with correct styles', () => {
3+
test('cssx.set creates a class with correct styles', () => {
44
const styleObject = {
55
color: 'blue',
66
margin: '10px',

0 commit comments

Comments
 (0)