{"library":"postcss-tape","title":"PostCSS Tape","description":"PostCSS Tape is a development utility designed to streamline the testing of PostCSS plugins. Currently at stable version 6.0.1, this package offers a focused approach to testing by abstracting the boilerplate often associated with PostCSS processing. It allows developers to define test cases efficiently through configuration files like `.tape.js`, `.mjs`, or `.cjs`, supporting both CommonJS and ES Modules for test definitions. Key differentiators include its automatic test generation for empty cases, comprehensive options for testing plugin behavior (including PostCSS plugin options, process options, warning counts, and error matching), and a simple CLI-first interface. The package typically updates in response to major PostCSS releases, ensuring compatibility with the latest versions. It provides a structured yet flexible framework for ensuring the correctness and stability of PostCSS transformations.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install postcss-tape"],"cli":{"name":"tape","version":null}},"imports":["export default { 'my-test': { message: '...' } }; // In .tape.mjs or .tape.js with type: 'module'","module.exports = { 'my-test': { message: '...' } }; // In .tape.cjs or .tape.js without type: 'module'","npm test // if 'postcss-tape' is in package.json scripts"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install --save-dev postcss-tape\n# Add to your package.json\n# {\n#   \"scripts\": {\n#     \"test\": \"postcss-tape\"\n#   }\n# }\n# Create a file named .tape.js at the root of your project\n// .tape.js\nexport default {\n  'basic-test': {\n    message: 'supports basic plugin functionality',\n    source: 'input.css',\n    expect: 'output.expect.css',\n    options: { /* plugin options */ }\n  },\n  'another-test:variant': {\n    message: 'supports a variant of another test',\n    source: 'input.css',\n    expect: 'output-variant.expect.css',\n    options: { /* different plugin options */ }\n  }\n};\n// Optional: Create input.css and output.expect.css in a 'fixtures' directory\n// Then run:\nnpm test","lang":"javascript","description":"Demonstrates installation, configuration via .tape.js, and running tests for a PostCSS plugin using the CLI.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}