-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {createTV} from "../index"; | ||
|
||
describe("createTV", () => { | ||
test("should use config in tv calls", () => { | ||
const tv = createTV({twMerge: false}); | ||
const h1 = tv({base: "text-3xl font-bold text-blue-400 text-xl text-blue-200"}); | ||
|
||
expect(h1()).toBe("text-3xl font-bold text-blue-400 text-xl text-blue-200"); | ||
}); | ||
|
||
test("should override config", () => { | ||
const tv = createTV({twMerge: false}); | ||
const h1 = tv( | ||
{base: "text-3xl font-bold text-blue-400 text-xl text-blue-200"}, | ||
{twMerge: true}, | ||
); | ||
|
||
expect(h1()).toBe("font-bold text-xl text-blue-200"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters