mirror of
https://github.com/prymitive/karma
synced 2026-05-11 03:46:48 +00:00
Test color.merge()
This commit is contained in:
@@ -62,4 +62,26 @@ test("colors getStyle()", () => {
|
||||
expect(colors.getStyle("foo", "bar")).toEqual(
|
||||
"background-color: rgba(0, 1, 2, 255); color: rgba(3, 4, 5, 128); "
|
||||
);
|
||||
var d = {
|
||||
"foo": {
|
||||
"bar2": {
|
||||
"background": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 2,
|
||||
"alpha": 255
|
||||
},
|
||||
"font": {
|
||||
"red": 3,
|
||||
"green": 4,
|
||||
"blue": 5,
|
||||
"alpha": 128
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
colors.merge(d);
|
||||
expect(colors.getStyle("foo", "bar2")).toEqual(
|
||||
"background-color: rgba(1, 1, 2, 255); color: rgba(3, 4, 5, 128); "
|
||||
);
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user