원클릭으로
add-test
// Scaffold a test for a react-native-css feature following the project's testing conventions.
// Scaffold a test for a react-native-css feature following the project's testing conventions.
Triage a Nativewind or react-native-css GitHub issue. Reads the issue, determines version/repo, creates a reproduction, tests against latest published and local HEAD, then drafts a comment.
Explain the react-native-css architecture, compiler pipeline, and key files. Use when a contributor wants to understand how the codebase works.
| 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.