Skip to content

Commit

Permalink
add test for background
Browse files Browse the repository at this point in the history
  • Loading branch information
agneym committed Sep 21, 2019
1 parent 61e2b0b commit 75797e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions __tests__/generate-html.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("Generate HTML", () => {
expect(result.includes(`slot="title"`)).toBe(true);
});

it(`creates large payload`, () => {
it(`creates html output for large payload`, () => {
const result = generateHtml({
assetPath: "demo/",
componentUrl: "https://unpkg.com/@agney/[email protected]",
Expand All @@ -47,7 +47,16 @@ describe("Generate HTML", () => {
subtitle: "Works with Markdown files",
imageUrl: "https://avatars3.githubusercontent.com/u/8883368?s=40&v=4"
});
expect(result).toBeTruthy();
});

it("adds gradient as background", () => {
const result = generateHtml({
background: "linear-gradient(to right, #000428, #004e92)"
});
console.log(result);
expect(true).toBe(true);
expect(result.includes("linear-gradient(to right, #000428, #004e92)")).toBe(
true
);
});
});
Binary file removed demo/this-file.jpg
Binary file not shown.

0 comments on commit 75797e3

Please sign in to comment.