From ed3b4293569db335bcb2bbd269ff7405387f52b0 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sat, 25 Nov 2023 16:20:28 +0800
Subject: [PATCH] test: fix test case error. (#29)
---
test/index.test.ts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/index.test.ts b/test/index.test.ts
index c312463..d3c4394 100644
--- a/test/index.test.ts
+++ b/test/index.test.ts
@@ -2,10 +2,10 @@ import FS from 'fs-extra';
import path from 'path';
import run from '../src';
import { badge } from '../src/badges';
-import { create, Summary } from '../src/create';
+import { create } from '../src/create';
import { cliHelp, exampleHelp } from '../src';
-const mockSummary: Summary = {
+const mockSummary = {
total: {
lines: {
total: 60,
@@ -85,11 +85,11 @@ it('test badge case - custom label', async () => {
expect(str.indexOf(`${customLabel}`) > 0).toBeTruthy();
});
-it.skip('test badge case - custom icon', async () => {
+it('test badge case - custom icon', async () => {
const customIcon = "./test/sample-logo.svg";
- const processedIconString = ``;
+ const processedIconString = ``;
+ // const processedIconString = ``;
const str = badge({ style: 'flat', status: '85%', icon: customIcon }, mockSummary as any);
-
expect(str.indexOf(processedIconString) > 0).toBeTruthy();
});