Utilização

Fake platform and network behavior

tsx
import { Text, clipboard } from 'kuito';
import { assert, render, screen, test } from 'kuito/tests';

function PasteHint() {
  return <Text>{clipboard.hasText.value ? 'Paste' : 'Nothing to paste'}</Text>;
}

test('the hint follows the clipboard', async () => {
  await render(<PasteHint />, {
    modules: { Clipboard: { hasText: true } },
    fetch: () => ({ status: 200, body: '{}' }),
  });

  assert.ok(screen.getByText('Paste'));
});

Propriedades e métodos 1

NomeTipoObrigatórioDescrição
valuesó de leiturabooleanSim—
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.