Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Returns and object with `data-test-id` as key and attributeValue as
* associated value to the key
* @function
* @name getDataTestAttribute
*
* @param {string} attributeValue
* @returns {object}
*/
export function getDataTestAttribute(attributeValue) {
return process.env.NODE_ENV !== "production"
? {
"data-test-id": attributeValue,
}
: {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment