用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/nativewind/react-native-css --skill add-test命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | add-test |
| description | Scaffold a test for a react-native-css feature following the project's testing conventions. |
| argument-hint | ["feature-or-css-property"] |
| allowed-tools | Read, Grep, Glob, Edit, Write |
react-native-css has three test domains in src/__tests__/:
babel/ — Babel plugin tests using babel-plugin-testercompiler/ — CSS compilation tests verifying JSON outputnative/ — Runtime tests for style applicationsrc/__tests__/babel/)Use babel-plugin-tester:
import { pluginTester } from "babel-plugin-tester";
pluginTester({
plugin,
tests: {
"test name": {
code: `import { View } from 'react-native';`,
output: `import { View } from 'react-native-css/components';`,
},
},
});
src/__tests__/compiler/)Verify CSS → JSON compilation output structure.
src/__tests__/native/)Test runtime style application on native platform.
Identify the feature: What needs testing? Use $ARGUMENTS as the starting point.
Determine the domain: Is this a babel transform, compiler output, or runtime behavior?
Find existing tests: Search the appropriate src/__tests__/ subdirectory for similar tests.
Write the test: Follow the conventions of the domain.
Run the test: Execute yarn test. Note: ignore ExperimentalWarning: VM Modules warnings — they're expected.