forked from vn7n24fzkq/github-profile-summary-cards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71e7c20
commit 23cd7ae
Showing
5 changed files
with
177 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const Themes = require("../../src/const/theme"); | ||
|
||
describe("Validate all theme", () => { | ||
it("theme colors are match the color regex", () => { | ||
const colorRegex = /^#[0-9A-Fa-f]{6}$/; | ||
for (let themeName in Themes) { | ||
let theme = Themes[themeName]; | ||
expect(theme.title_color).toMatch(colorRegex); | ||
expect(theme.text_color).toMatch(colorRegex); | ||
expect(theme.bg_color).toMatch(colorRegex); | ||
expect(theme.stroke_color).toMatch(colorRegex); | ||
expect(theme.icon_color).toMatch(colorRegex); | ||
expect(theme.line_chart_color).toMatch(colorRegex); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { writeSVG, outputPath } = require("../../src/utils/svg-writer"); | ||
const fs = require("fs"); | ||
|
||
describe("Test output function", () => { | ||
it("test write svg can work", () => { | ||
writeSVG("test", "write-svg", "work"); | ||
let content = fs.readFileSync(`${outputPath}test/write-svg.svg`, { | ||
encoding: "utf8", | ||
flag: "r", | ||
}); | ||
expect(content).toEqual("work"); | ||
}); | ||
}); |