Skip to content

Commit d4e5d95

Browse files
committed
cleaned up rollup configs under vue
1 parent c703b2e commit d4e5d95

File tree

5 files changed

+8
-24
lines changed

5 files changed

+8
-24
lines changed

packages/vue/rollup.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
66
import commonjs from '@rollup/plugin-commonjs';
77
import postcss from 'rollup-plugin-postcss';
88
import fs from 'fs-extra';
9-
import path from 'path';
109

1110
// common config settings
1211
const input = ['src/index.ts'];
1312
const sourceMap = false;
14-
const tsconfig = 'tsconfig.dist.json';
1513
const esmOutputDir = 'dist/esm';
1614

1715
// Common output options
@@ -68,7 +66,7 @@ const config = defineConfig([
6866
tsconfigOverride: {
6967
compilerOptions: { sourceMap, declaration: true, declarationDir: 'dist', rootDir: 'src' },
7068
include: ['src/**/*'],
71-
exclude: ['node_modules', '**/__tests__/**', '**/*.test.*']
69+
exclude: ['node_modules', '**/__tests__/**', '**/*.test.*', 'scripts/**']
7270
}
7371
}),
7472
ensureStyles()

packages/vue/scripts/copyCSS.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/vue/scripts/generatePrimitiveCatalog.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/vue/src/components/__tests__/authenticator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('authenticator', () => {
170170
});
171171

172172
it.each(routesWithComponent)('renders %s subcomponent', (route) => {
173-
let user: { username: string } | undefined = undefined;
173+
let user = undefined;
174174
const challengeName = 'SOFTWARE_TOKEN_MFA';
175175

176176
// some routes expect specific shape of user

packages/vue/src/components/__tests__/password-control.spec.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,30 +150,18 @@ describe('PasswordControl', () => {
150150

151151
it('toggles input field type when show password button is clicked', async () => {
152152
render(PasswordControl, {
153-
props: {
154-
name: 'password',
155-
label: 'Password',
156-
placeholder: 'Password',
157-
},
153+
global: { components },
154+
props: { name: 'password', label: 'Password' },
158155
});
159-
160-
const input = screen.getByPlaceholderText('Password');
156+
const input = screen.getByLabelText('Password');
161157
const showPasswordButton = screen.getByRole('switch');
162158

163-
// Initial state: password is hidden (type=password)
164-
expect(input.getAttribute('type')).toBe('password');
165-
expect(showPasswordButton.getAttribute('aria-checked')).toBe('false');
159+
expect(input).toHaveAttribute('type', 'password');
166160

167-
// Click the button to show password (should change to type=text)
168161
await fireEvent.click(showPasswordButton);
162+
expect(input).toHaveAttribute('type', 'text');
169163

170-
// After clicking, the password should be visible
171-
expect(input.getAttribute('type')).toBe('text');
172-
expect(showPasswordButton.getAttribute('aria-checked')).toBe('true');
173-
174-
// Click again to hide password (should change back to type=password)
175164
await fireEvent.click(showPasswordButton);
176-
expect(input.getAttribute('type')).toBe('password');
177-
expect(showPasswordButton.getAttribute('aria-checked')).toBe('false');
165+
expect(input).toHaveAttribute('type', 'password');
178166
});
179167
});

0 commit comments

Comments
 (0)