diff --git a/src/components/atoms/button/Button.test.tsx b/src/components/atoms/button/Button.test.tsx
index dc756ce7..59e1705f 100644
--- a/src/components/atoms/button/Button.test.tsx
+++ b/src/components/atoms/button/Button.test.tsx
@@ -141,13 +141,13 @@ describe('Button — component behavior', () => {
it('applies aria-pressed when the prop is provided', () => {
render();
- const btn = screen.getByRole('switch', { name: 'Toggle' });
+ const btn = screen.getByRole('button', { name: 'Toggle' });
expect(btn).toHaveAttribute('aria-pressed', 'false');
});
- it('sets role="switch" when aria-pressed prop is provided', () => {
+ it('keeps role="button" when aria-pressed prop is provided', () => {
render();
- expect(screen.getByRole('switch', { name: 'Toggle' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: 'Toggle' })).toBeInTheDocument();
});
it('sets role="button" when aria-pressed prop is NOT provided', () => {
diff --git a/tsconfig.json b/tsconfig.json
index 46e8a7d0..41a36ab0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
- "target": "ES2024",
+ "target": "ES2022",
"useDefineForClassFields": true,
"module": "ESNext",
"skipLibCheck": true,
diff --git a/vite.config.ts b/vite.config.ts
index 6d86f75b..b60f2ae6 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -45,7 +45,7 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
- setupFiles: ['./src/tests/setup.ts'],
+ setupFiles: ['./tests/setup.ts'],
css: false,
alias: aliases,
coverage: {