Skip to content

Commit 10b50bf

Browse files
committed
chore: prepare release 0.0.1
1 parent a6b5b2d commit 10b50bf

9 files changed

+23
-19
lines changed

bun.lockb

-10.2 KB
Binary file not shown.

bunfig.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[test]
2+
preload = './setup-tests.ts'

jest.config.ts

-10
This file was deleted.

lib/components/Button/Button.test.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { render } from '@testing-library/react';
2-
import { describe, test } from 'vitest';
1+
import { render, screen } from '@testing-library/react';
2+
import { describe, test, expect } from 'bun:test';
33
import Button from './Button';
44

5-
describe('Fulidity Button', () => {
5+
describe('Fluidity Button', () => {
66
test('renders correctly', () => {
7-
render(<Button />);
7+
render(<Button>Fluidity</Button>);
8+
expect(screen.getByText(/Fluidity/)).toBeDefined();
89
});
910
});

lib/components/Button/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { getBEM } from '../../utils/bem.util';
2+
import { getBEM } from '../../utils';
33
import './Button.scss';
44

55
type IconType = React.ReactElement<React.HTMLProps<HTMLOrSVGElement>>;

lib/utils/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './bem.util';

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"test": "vitest",
2626
"check": "biome check ./lib --apply",
2727
"sb": "storybook dev -p 6006",
28-
"prepublishOnly": "bun run lib",
28+
"prepublishOnly": "bun run build",
2929
"build": "tsc --p ./tsconfig.lib.json && vite build",
3030
"build-docs": "storybook build -o docs"
3131
},
@@ -60,16 +60,19 @@
6060
"@storybook/react": "^8.0.5",
6161
"@storybook/react-vite": "^8.0.5",
6262
"@storybook/test": "^8.0.5",
63+
"@testing-library/jest-dom": "^6.4.2",
6364
"@testing-library/react": "^14.0.0",
65+
"@types/bun": "^1.0.12",
66+
"@types/react": "^18.2.75",
67+
"@types/react-dom": "^18.2.24",
6468
"@vitejs/plugin-react": "^4.2.1",
6569
"react-test-renderer": "^18.2.0",
6670
"sass": "^1.74.1",
6771
"storybook": "^8.0.5",
6872
"typescript": "^5.2.2",
6973
"vite": "^5.2.0",
7074
"vite-plugin-dts": "^3.8.1",
71-
"vite-plugin-lib-inject-css": "^2.0.1",
72-
"vitest": "^1.4.0"
75+
"vite-plugin-lib-inject-css": "^2.0.1"
7376
},
7477
"trustedDependencies": [
7578
"@biomejs/biome"

setup-tests.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { GlobalRegistrator } from '@happy-dom/global-registrator';
2+
import * as matchers from '@testing-library/jest-dom/matchers';
3+
import { expect } from "bun:test";
4+
5+
GlobalRegistrator.register();
6+
expect.extend(matchers);

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
"isolatedModules": true,
1414
"noEmit": true,
1515
"jsx": "react-jsx",
16+
"types": ["bun-types"],
1617

1718
/* Linting */
1819
"strict": true,
1920
"noUnusedLocals": true,
2021
"noUnusedParameters": true,
2122
"noFallthroughCasesInSwitch": true
2223
},
23-
"include": ["src", "lib"],
24+
"include": ["lib"],
2425
"references": [{ "path": "./tsconfig.node.json" }]
2526
}

0 commit comments

Comments
 (0)