@netdata/netdata-ui
Version:
netdata UI kit
49 lines • 1.05 kB
JavaScript
import { DefaultTheme as theme } from "../../../theme/default";
import height from "./height";
it("renders", function () {
expect(height({
theme: theme
})).toBe(undefined);
});
it("renders value", function () {
expect(height({
theme: theme,
height: "10rem"
})).toBe("height: 10rem;");
expect(height({
theme: theme,
height: 4
})).toBe("height: 16px;");
});
it("renders min max", function () {
expect(height({
theme: theme,
height: {
min: "20rem",
max: "45rem"
}
})).toBe("\n min-height: 20rem;\n max-height: 45rem;\n ");
expect(height({
theme: theme,
height: {
min: 1,
max: 2
}
})).toBe("\n min-height: 4px;\n max-height: 8px;\n ");
});
it("renders max", function () {
expect(height({
theme: theme,
height: {
max: "45rem"
}
}).trim()).toBe("max-height: 45rem;");
});
it("renders min", function () {
expect(height({
theme: theme,
height: {
min: "20rem"
}
}).trim()).toBe("min-height: 20rem;");
});