28 lines
563 B
Nix
28 lines
563 B
Nix
|
let
|
||
|
html = import ../nixite/html.nix;
|
||
|
it = import ./it.nix;
|
||
|
in
|
||
|
with html; [
|
||
|
(it "makes a p tag" {
|
||
|
actual = tag "p" {} "Hello";
|
||
|
expected = {
|
||
|
tag = "p";
|
||
|
attrs = {};
|
||
|
child = "Hello";
|
||
|
__toString = toHTML;
|
||
|
};
|
||
|
})
|
||
|
|
||
|
(it "applies style" (let
|
||
|
page = tag "html" {} [(tag "head" {} ["foo"])];
|
||
|
in {
|
||
|
actual = addToHead page ["bar"];
|
||
|
expected = {
|
||
|
tag = "html";
|
||
|
attrs = {};
|
||
|
child = [(tag "head" {} ["foo" "bar"])];
|
||
|
__toString = toHTML;
|
||
|
};
|
||
|
}))
|
||
|
]
|