Socket
Socket
Sign inDemoInstall

jest-each

Package Overview
Dependencies
25
Maintainers
4
Versions
143
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 30.0.0-alpha.4 to 30.0.0-alpha.5

5

build/index.js

@@ -117,2 +117,3 @@ /*!

const INDEX_PLACEHOLDER = '%#';
const NUMBER_PLACEHOLDER = '%$';
const PLACEHOLDER_PREFIX = '%';

@@ -143,7 +144,7 @@ const ESCAPED_PLACEHOLDER_PREFIX = /%%/g;

return util().format(formattedTitle, normalisedValue);
}, interpolateTitleIndex(interpolateEscapedPlaceholders(title), rowIndex)).replaceAll(new RegExp(JEST_EACH_PLACEHOLDER_ESCAPE, 'g'), PLACEHOLDER_PREFIX);
}, interpolateTitleIndexAndNumber(interpolateEscapedPlaceholders(title), rowIndex)).replaceAll(new RegExp(JEST_EACH_PLACEHOLDER_ESCAPE, 'g'), PLACEHOLDER_PREFIX);
const normalisePlaceholderValue = value => typeof value === 'string' ? value.replaceAll(new RegExp(PLACEHOLDER_PREFIX, 'g'), JEST_EACH_PLACEHOLDER_ESCAPE) : value;
const getMatchingPlaceholders = title => title.match(SUPPORTED_PLACEHOLDERS) || [];
const interpolateEscapedPlaceholders = title => title.replaceAll(ESCAPED_PLACEHOLDER_PREFIX, JEST_EACH_PLACEHOLDER_ESCAPE);
const interpolateTitleIndex = (title, index) => title.replace(INDEX_PLACEHOLDER, index.toString());
const interpolateTitleIndexAndNumber = (title, index) => title.replace(INDEX_PLACEHOLDER, index.toString()).replace(NUMBER_PLACEHOLDER, (index + 1).toString());
const interpolatePrettyPlaceholder = (title, value) => title.replace(PRETTY_PLACEHOLDER, (0, _prettyFormat().format)(value, {

@@ -150,0 +151,0 @@ maxDepth: 1,

12

package.json
{
"name": "jest-each",
"version": "30.0.0-alpha.4",
"version": "30.0.0-alpha.5",
"description": "Parameterised tests for Jest",

@@ -30,7 +30,7 @@ "main": "./build/index.js",

"dependencies": {
"@jest/types": "30.0.0-alpha.4",
"@jest/types": "30.0.0-alpha.5",
"chalk": "^4.0.0",
"jest-get-type": "30.0.0-alpha.4",
"jest-util": "30.0.0-alpha.4",
"pretty-format": "30.0.0-alpha.4"
"jest-get-type": "30.0.0-alpha.5",
"jest-util": "30.0.0-alpha.5",
"pretty-format": "30.0.0-alpha.5"
},

@@ -43,3 +43,3 @@ "engines": {

},
"gitHead": "32b966f988d47a7673d2ef4b92e834dab7d66f07"
"gitHead": "fa24a3bdd6682978d76799265016fb9d5bff135e"
}

@@ -43,2 +43,3 @@ <div align="center">

- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.

@@ -122,2 +123,3 @@ - Unique test titles by injecting properties of test case object

- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.

@@ -149,2 +151,3 @@ - Or generate unique test titles by injecting properties of test case object with `$variable`

- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.

@@ -151,0 +154,0 @@ - Or generate unique test titles by injecting properties of test case object with `$variable`

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc