@oalacea/daemon 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/LICENSE +23 -0
- package/README.md +141 -0
- package/agents/deps-analyzer.js +366 -0
- package/agents/detector.js +570 -0
- package/agents/fix-engine.js +305 -0
- package/agents/lighthouse-scanner.js +405 -0
- package/agents/perf-analyzer.js +294 -0
- package/agents/perf-front-analyzer.js +229 -0
- package/agents/test-generator.js +387 -0
- package/agents/test-runner.js +318 -0
- package/bin/Dockerfile +74 -0
- package/bin/cli.js +449 -0
- package/lib/config.js +250 -0
- package/lib/docker.js +207 -0
- package/lib/reporter.js +297 -0
- package/package.json +34 -0
- package/prompts/DEPS_EFFICIENCY.md +558 -0
- package/prompts/E2E.md +491 -0
- package/prompts/EXECUTE.md +1060 -0
- package/prompts/INTEGRATION_API.md +484 -0
- package/prompts/INTEGRATION_DB.md +425 -0
- package/prompts/PERF_API.md +433 -0
- package/prompts/PERF_DB.md +430 -0
- package/prompts/PERF_FRONT.md +357 -0
- package/prompts/REMEDIATION.md +482 -0
- package/prompts/UNIT.md +260 -0
- package/scripts/dev.js +106 -0
- package/templates/README.md +38 -0
- package/templates/k6/load-test.js +54 -0
- package/templates/playwright/e2e.spec.ts +61 -0
- package/templates/vitest/angular-component.test.ts +38 -0
- package/templates/vitest/api.test.ts +51 -0
- package/templates/vitest/component.test.ts +27 -0
- package/templates/vitest/hook.test.ts +36 -0
- package/templates/vitest/solid-component.test.ts +34 -0
- package/templates/vitest/svelte-component.test.ts +33 -0
- package/templates/vitest/vue-component.test.ts +39 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { render, screen } from '@solidjs/testing-library';
|
|
2
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
3
|
+
|
|
4
|
+
// TODO: Import your component
|
|
5
|
+
// import ComponentName from '@/components/ComponentName';
|
|
6
|
+
|
|
7
|
+
describe('ComponentName', () => {
|
|
8
|
+
it('should render', () => {
|
|
9
|
+
// TODO: Add component render
|
|
10
|
+
// render(() => <ComponentName />);
|
|
11
|
+
// expect(screen.getByRole('button')).toBeInTheDocument();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should render with props', () => {
|
|
15
|
+
// TODO: Test props
|
|
16
|
+
// render(() => <ComponentName title="Test Title" />);
|
|
17
|
+
// expect(screen.getByText('Test Title')).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should handle user interaction', async () => {
|
|
21
|
+
// TODO: Test events
|
|
22
|
+
// const handleClick = vi.fn();
|
|
23
|
+
// render(() => <ComponentName onClick={handleClick} />);
|
|
24
|
+
// const button = screen.getByRole('button');
|
|
25
|
+
// button.click();
|
|
26
|
+
// expect(handleClick).toHaveBeenCalledTimes(1);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should update with reactive state', () => {
|
|
30
|
+
// TODO: Test reactivity
|
|
31
|
+
// const { container } = render(() => <ComponentName count={5} />);
|
|
32
|
+
// expect(container.textContent).toContain('5');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/svelte';
|
|
2
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
3
|
+
|
|
4
|
+
// TODO: Import your component
|
|
5
|
+
// import ComponentName from '@/components/ComponentName.svelte';
|
|
6
|
+
|
|
7
|
+
describe('ComponentName', () => {
|
|
8
|
+
it('should render', () => {
|
|
9
|
+
// TODO: Add component render
|
|
10
|
+
// render(ComponentName);
|
|
11
|
+
// expect(container).toBeTruthy();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should render with props', () => {
|
|
15
|
+
// TODO: Test props
|
|
16
|
+
// const { container } = render(ComponentName, { props: { title: 'Test Title' } });
|
|
17
|
+
// expect(container.textContent).toContain('Test Title');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should handle user interaction', async () => {
|
|
21
|
+
// TODO: Test events
|
|
22
|
+
// const { container, component } = render(ComponentName);
|
|
23
|
+
// const button = container.querySelector('button');
|
|
24
|
+
// button.click();
|
|
25
|
+
// expect(component.$$).toBeDefined();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('should update when props change', async () => {
|
|
29
|
+
// TODO: Test reactivity
|
|
30
|
+
// const { container } = render(ComponentName, { props: { count: 0 } });
|
|
31
|
+
// // Update props and check reactivity
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
3
|
+
|
|
4
|
+
// TODO: Import your component
|
|
5
|
+
// import ComponentName from '@/components/ComponentName.vue';
|
|
6
|
+
|
|
7
|
+
describe('ComponentName', () => {
|
|
8
|
+
it('should render', () => {
|
|
9
|
+
// TODO: Add component render
|
|
10
|
+
// const wrapper = mount(ComponentName);
|
|
11
|
+
// expect(wrapper.exists()).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should render with props', () => {
|
|
15
|
+
// TODO: Test props
|
|
16
|
+
// const wrapper = mount(ComponentName, {
|
|
17
|
+
// props: { title: 'Test Title' }
|
|
18
|
+
// });
|
|
19
|
+
// expect(wrapper.text()).toContain('Test Title');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should handle user interaction', async () => {
|
|
23
|
+
// TODO: Test events
|
|
24
|
+
// const wrapper = mount(ComponentName, {
|
|
25
|
+
// props: { onClick: vi.fn() }
|
|
26
|
+
// });
|
|
27
|
+
// await wrapper.find('button').trigger('click');
|
|
28
|
+
// expect(wrapper.emitted('click')).toBeTruthy();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should update when props change', async () => {
|
|
32
|
+
// TODO: Test reactivity
|
|
33
|
+
// const wrapper = mount(ComponentName, {
|
|
34
|
+
// props: { count: 0 }
|
|
35
|
+
// });
|
|
36
|
+
// await wrapper.setProps({ count: 5 });
|
|
37
|
+
// expect(wrapper.text()).toContain('5');
|
|
38
|
+
});
|
|
39
|
+
});
|