tests: added tests for renderTopLanguages & top-langs
This commit is contained in:
1 parent
b50555ad9a
commit
7c104cf8c5
4 files changed
+367
-8
No files matched your search
+8
-1
@@ -1,11 +1,17 @@
|
||||
require("dotenv").config();
|
||||
const { renderError, clampValue, CONSTANTS } = require("../src/utils");
|
||||
const {
|
||||
renderError,
|
||||
clampValue,
|
||||
parseBoolean,
|
||||
CONSTANTS,
|
||||
} = require("../src/utils");
|
||||
const fetchTopLanguages = require("../src/fetchTopLanguages");
|
||||
const renderTopLanguages = require("../src/renderTopLanguages");
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
hide_title,
|
||||
card_width,
|
||||
title_color,
|
||||
text_color,
|
||||
@@ -34,6 +40,7 @@ module.exports = async (req, res) => {
|
||||
res.send(
|
||||
renderTopLanguages(topLangs, {
|
||||
theme,
|
||||
hide_title: parseBoolean(hide_title),
|
||||
card_width: parseInt(card_width, 10),
|
||||
title_color,
|
||||
text_color,
|
||||
|
||||
Reference in new issue
Block a user