Skip to content

Commit

Permalink
improve jest
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Nov 8, 2023
1 parent 29873c4 commit be31af3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
9 changes: 0 additions & 9 deletions apps/pwa/src/app/index.test.tsx

This file was deleted.

9 changes: 9 additions & 0 deletions apps/pwa/src/components/label/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { cleanup, render } from '@testing-library/react';
import Label from '.';

afterEach(cleanup);

test('component label', () => {
const { container } = render(<Label label="标签" />);
expect(container.children.length).toBe(1);
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import upperCaseFirstLetter from '@/style/capitalize';
import { ForwardedRef, forwardRef, HtmlHTMLAttributes, ReactNode } from 'react';
import styled from 'styled-components';
import { CSSVariable } from '../global_style';
import { CSSVariable } from '../../global_style';

const Style = styled.label`
> .top {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "cicada",
"description": "A multi-user music service for self-hosting.",
"private": true,
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/mebtte/cicada.git"
Expand Down

0 comments on commit be31af3

Please sign in to comment.