Skip to content

Commit

Permalink
test: fix test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 2, 2025
1 parent 05cc255 commit dff62e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ it('github-corners test case', async () => {
document: {},
});
expect(html.indexOf('<dark-mode style=') > 0).toBeTruthy();
expect(html.indexOf('<github-corners target="__blank"') > 0).toBeTruthy();
expect(html.indexOf('<a xlink:href="') > 0).toBeTruthy();
expect(html.indexOf('max-width: 960px; margin: 0 auto 60px auto; padding: 8px') > 0).toBeTruthy();
expect(html.indexOf('class="markdown-style"') > 0).toBeTruthy();

Expand All @@ -95,7 +95,7 @@ it('github-corners test case', async () => {
'github-corners': 'https://github.com/jaywcjlove/markdown-to-html-cli',
document: undefined,
});
expect(html.indexOf('<github-corners target="__blank" position="fixed" z-index="999" href="https://github.com/jaywcjlove/markdown-to-html-cli"></github-corners>') > 0).toBeTruthy();
expect(html.indexOf('<a xlink:href="https://github.com/jaywcjlove/markdown-to-html-cli"') > 0).toBeTruthy();
expect(html.indexOf('https://github.com/jaywcjlove/markdown-to-html-cli') > -1).toBeTruthy();

html = create({
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ console.log = jest.fn();
it('githubCorners test case', async () => {
expect(githubCorners({ })).toBeUndefined();
expect(githubCornersFork({ })).toBeUndefined();
expect(Object.keys(githubCorners({ href: 'https://github.com/jaywcjlove/markdown-to-html-cli' }))).toEqual(expect.arrayContaining(["0", "1"]));
expect(Object.keys(githubCorners({ href: 'https://github.com/jaywcjlove/markdown-to-html-cli' }))).toEqual(expect.arrayContaining(["0"]));
});

it('copyElement test case', async () => {
Expand Down

0 comments on commit dff62e2

Please sign in to comment.