New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-autotest

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-autotest - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

2

index.js

@@ -32,3 +32,3 @@ 'use strict';

const id = process.env.NODE_ENV === 'production' ? shortid.generate() : `test-${String(hash++)}`;
const id = process.env.NODE_ENV === 'production' ? shortid.generate().toLowerCase() : `test-${String(hash++)}`;

@@ -35,0 +35,0 @@ openingElement.attributes.push(t.JSXAttribute(t.JSXIdentifier(`data-${id}`)));

{
"name": "babel-plugin-autotest",
"version": "0.2.0",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "repository": {

@@ -34,3 +34,3 @@ # babel-plugin-autotest

/**
* [data-test="dadad"] [data-test="czczxc"]
* [data-dadad] [data-czczx]
*/

@@ -40,3 +40,3 @@ console.log(get`${MyComponent} ${MyButton}`)

/**
* .myClassName > [data-test="czczxc"]
* .myClassName > [data-czczx]
*/

@@ -48,2 +48,2 @@ console.log(get`.myClassName > ${MyButton}`)

This plugin tries to find all React Component declarations, and to add `data-test` attribute to the Component's root node with the uniq hash-id. It also saves this id as the static property for this Component, so `get` function uses this property to build a selector.
This plugin tries to find all React Component declarations and to add `data-{hash}` attribute with the uniq hash-id to the Component's root node. It also saves this hash as the static property for the Component, so `get` function uses this property to build a selector.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc