chrome:shell.skip

generated:catalog.entry.testing.title

@xngui/testing
@xngui/testing

generated: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.ts
  • button.html
  • button.css
  • button.harness.tstesting-doc:tree.harness
  • button.spec.tstesting-doc:tree.spec
  • *.harness.tstesting-doc:data.layout-harness-location

    testing-doc:data.layout-harness-note

  • *.spec.tstesting-doc:data.layout-spec-location

    testing-doc:data.layout-spec-note

  • @xngui/testingtesting-doc:data.layout-package-location

    testing-doc:data.layout-package-note

testing-doc:section.write

testing-doc:lead.write

testing-doc:heading.spec-conventions

configure.ts
import { 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);  });});

testing-doc:section.run

testing-doc:lead.run

testing-doc:heading.run-tests

terminal
pnpm nx run components:test
terminal
pnpm nx affected -t test

testing-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