toolly
登录/注册
返回

humanizer

📊 数据与分析
访问 GitHub

专注于消除文本中的人工智能写作痕迹,通过识别并修正过度修饰、空洞修辞、结构僵化、用词套路化等典型问题,使文字更贴近真实人类的表达习惯;强调具体细节、自然节奏、个人视角与适度不完美,让内容既有信息量又有…

简介

专注于消除文本中的人工智能写作痕迹,通过识别并修正过度修饰、空洞修辞、结构僵化、用词套路化等典型问题,使文字更贴近真实人类的表达习惯;强调具体细节、自然节奏、个人视角与适度不完美,让内容既有信息量又有…

核心能力速览
✓所属分类:📊 数据与分析
✓通过 Agent Skills 协议,将「能力」封装为可复用、可安装的 AI 组件
✓支持按需加载领域知识与工具,让通用模型转变为特定任务的专家
适用场景

适用于「📊 数据与分析」相关场景,可作为可复用的 AI 能力组件,接入支持 Agent Skills 的 AI 客户端(如 Claude、Cursor、Cline 等),按需调用以扩展模型能力。

Skills.MD

<div align="center"> <a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=react-native-testing-library" align="center"> <img src="https://github.com/user-attachments/assets/4d452312-4ffd-4439-855f-a9b12ad7d6c2" alt="React Native Testing Library" /> </a> <p align="center">Developer-friendly and complete React Native testing utilities that encourage good testing practices.</p> </div>

Version Build Status Code Coverage Downloads MIT License Sponsored by Callstack

The problem

You want to write maintainable tests for your React Native components. Your tests should avoid implementation details and focus on giving you confidence. They should remain maintainable so refactors (changes to implementation but not functionality) don't break your tests and slow you and your team down.

This solution

The React Native Testing Library (RNTL) tests React Native components. It simulates the React Native runtime on top of Test Renderer and encourages better testing practices. Its primary guiding principle is:

The more your tests resemble the way your software is used, the more confidence they can give you.

This project is inspired by React Testing Library. Tested to work with Jest, but it should work with other test runners as well.

Installation

Open a Terminal in your project's folder and run:

npm install --save-dev @testing-library/react-native

This library has a peerDependencies listing for Test Renderer. Make sure to install it as a dev dependency:

npm install --save-dev test-renderer

Additional Jest matchers

You can use the built-in Jest matchers automatically by having any import from @testing-library/react-native in your test.

Example

import { render, screen, userEvent } from '@testing-library/react-native';
import { QuestionsBoard } from '../QuestionsBoard';

test('form submits two answers', async () => {
  const questions = ['q1', 'q2'];
  const onSubmit = jest.fn();

  const user = userEvent.setup();
  await render(<QuestionsBoard questions={questions} onSubmit={onSubmit} />);

  const answerInputs = screen.getAllByLabelText('answer input');

  // simulates the user focusing on TextInput and typing text one char at a time
  await user.type(answerInputs[0], 'a1');
  await user.type(answerInputs[1], 'a2');

  // simulates the user pressing on any pressable element
  await user.press(screen.getByRole('button', { name: 'Submit' }));

  expect(onSubmit).toHaveBeenCalledWith({
    1: { q: 'q1', a: 'a1' },
    2: { q: 'q2', a: 'a2' },
  });
});

You can find the source of QuestionsBoard component and this example here.

API / Usage

React Native Testing Library consists of following APIs:

Migration Guides

Troubleshooting

Community Resources

Check out our list of Community Resources about RNTL.

Made with ❤️ at Callstack

React Native Testing Library is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at hello@callstack.com if you need any help with these or just want to say hi!

Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥


Supported and used by Rally Health.

<!-- badges -->

快捷安装

在终端执行以下命令,即可将本 Skill 安装到本地 AI 客户端:

npx skills add callstack/react-native-testing-library

相关推荐