generated:catalog.entry.testing.title
@xngui/testing@xngui/testinggenerated:catalog.entry.testing.description
testing-doc:section.overview
testing-doc:lead.overview
testing-doc:heading.overview
testing-doc:idea.harness.title
testing-doc:idea.harness.detail
testing-doc:idea.spec.title
testing-doc:idea.spec.detail
testing-doc:idea.factory.title
testing-doc:idea.factory.detail
- testing-doc:rule.do.label
testing-doc:rule.do.body
- testing-doc:rule.dont.label
testing-doc:rule.dont.body
testing-doc:section.files
testing-doc:lead.files
testing-doc:heading.disk-layout
testing-doc:tree.folder
button.tsbutton.htmlbutton.cssbutton.harness.tstesting-doc:tree.harnessbutton.spec.tstesting-doc:tree.spec
*.harness.tstesting-doc:data.layout-harness-locationtesting-doc:data.layout-harness-note
*.spec.tstesting-doc:data.layout-spec-locationtesting-doc:data.layout-spec-note
@xngui/testingtesting-doc:data.layout-package-locationtesting-doc:data.layout-package-note
testing-doc:section.write
testing-doc:lead.write
testing-doc:heading.spec-conventions
configure.tsimport { beforeEach, describe, expect, it } from 'vitest';import { configureXComponent, createXComponentHarness, provideXComponentI18n } from '@xngui/testing';import { XButtonHarness } from './button.harness';import { XButton } from './button';describe('XButton', () => { beforeEach(async () => { await configureXComponent(XButton, { providers: [provideXComponentI18n()] }); }); it('reflects disabled state', async () => { const { harness } = await createXComponentHarness(XButton, XButtonHarness, { disabled: true }); expect(harness.isDisabled()).toBe(true); });});host.tsimport { configureXComponent, createXHostHarness } from '@xngui/testing';beforeEach(async () => { await configureXComponent(ToggleGroupHost);});const { harness } = await createXHostHarness(ToggleGroupHost, XToggleGroupHarness, { selector: 'x-toggle-group',});shape.tsdescribe('inputs', () => { * one it per public input * });describe('outputs', () => { * one it per public output * });describe('logic', () => { * keyboard, guards, focus * });testing-doc:section.run
testing-doc:lead.run
testing-doc:heading.run-tests
terminalpnpm nx run components:testterminalpnpm nx affected -t testtesting-doc:heading.references
testing-doc:paragraph.references
testing-doc:link.actions-readme
libs/components/actions/testing/README.md
testing-doc:link.forms-readme
libs/components/forms/testing/README.md