Skip to content

Commit 0d2922e

Browse files
authored
test: add size- tests (#142)
1 parent b3bb1d7 commit 0d2922e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

src/__tests__/vendor/tailwind/sizing.test.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,55 @@ describe("Sizing - Max Height", () => {
239239
});
240240
});
241241
});
242+
243+
describe("Sizing - Size", () => {
244+
test("size-0", async () => {
245+
expect(await renderCurrentTest()).toStrictEqual({
246+
props: { style: { width: 0, height: 0 } },
247+
});
248+
});
249+
test("size-px", async () => {
250+
expect(await renderCurrentTest()).toStrictEqual({
251+
props: { style: { width: 1, height: 1 } },
252+
});
253+
});
254+
test("size-1", async () => {
255+
expect(await renderCurrentTest()).toStrictEqual({
256+
props: { style: { width: 3.5, height: 3.5 } },
257+
});
258+
});
259+
test("size-1/2", async () => {
260+
expect(await renderCurrentTest()).toStrictEqual({
261+
props: { style: { width: "50%", height: "50%" } },
262+
});
263+
});
264+
test("size-full", async () => {
265+
expect(await renderCurrentTest()).toStrictEqual({
266+
props: { style: { width: "100%", height: "100%" } },
267+
});
268+
});
269+
test("size-auto", async () => {
270+
expect(await renderCurrentTest()).toStrictEqual({
271+
props: {},
272+
warnings: { values: { width: "auto", height: "auto" } },
273+
});
274+
});
275+
test("size-min", async () => {
276+
expect(await renderCurrentTest()).toStrictEqual({
277+
props: {},
278+
warnings: { values: { width: "min-content", height: "min-content" } },
279+
});
280+
});
281+
test("size-max", async () => {
282+
expect(await renderCurrentTest()).toStrictEqual({
283+
props: {},
284+
warnings: { values: { width: "max-content", height: "max-content" } },
285+
});
286+
});
287+
test("size-fit", async () => {
288+
expect(await renderCurrentTest()).toStrictEqual({
289+
props: {},
290+
warnings: { values: { width: "fit-content", height: "fit-content" } },
291+
});
292+
});
293+
});

0 commit comments

Comments
 (0)