Skip to content

Commit 945866e

Browse files
committed
Add more tests for border-color
1 parent 0c3c5e3 commit 945866e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

src/index.spec.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,48 @@ describe("border", () => {
981981
});
982982
});
983983

984+
it("transforms border-color with hex color", () => {
985+
expect(
986+
transform(`
987+
.test {
988+
border-color: #f00;
989+
}
990+
`),
991+
).toEqual({
992+
test: {
993+
borderColor: "#f00",
994+
},
995+
});
996+
});
997+
998+
it("transforms border-color with rgb color", () => {
999+
expect(
1000+
transform(`
1001+
.test {
1002+
border-color: rgb(255, 0, 0);
1003+
}
1004+
`),
1005+
).toEqual({
1006+
test: {
1007+
borderColor: "rgb(255, 0, 0)",
1008+
},
1009+
});
1010+
});
1011+
1012+
it("transforms border-color with rgba color", () => {
1013+
expect(
1014+
transform(`
1015+
.test {
1016+
border-color: rgba(255, 0, 0, 0.1);
1017+
}
1018+
`),
1019+
).toEqual({
1020+
test: {
1021+
borderColor: "rgba(255, 0, 0, 0.1)",
1022+
},
1023+
});
1024+
});
1025+
9841026
it("transforms border-width", () => {
9851027
expect(
9861028
transform(`

0 commit comments

Comments
 (0)