Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-each-table

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-each-table - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

6

package.json
{
"name": "jest-each-table",
"version": "1.1.0",
"version": "2.0.0",
"description": "Create a test-case table for use with Jest's test.each tagged template literal",

@@ -17,5 +17,5 @@ "author": "Cameron Hunter <hello@cameronhunter.co.uk>",

"devDependencies": {
"jest": "^24.1.0",
"prettier": "^1.16.4"
"jest": "^27.0.6",
"prettier": "^2.3.2"
}
}
const Separator = '|';
const IndexHeader = 'testcaseIndex';
function getColumnTitlesFor(testcases) {
const keys = testcases.reduce((state, object) => new Set([...state, ...Object.keys(object)]), new Set());
return ['#', ...keys];
return [IndexHeader, ...keys];
}

@@ -12,3 +13,3 @@

...values,
...columns.reduce((state, column) => [...state, column === '#' ? index + 1 : testcase[column]], [])
...columns.reduce((state, column) => [...state, column === IndexHeader ? index + 1 : testcase[column]], []),
],

@@ -15,0 +16,0 @@ []

@@ -12,3 +12,3 @@ const createTestTable = require('./index');

testsuite('Testcase $#: $inputs.left + $inputs.right = $output', ({ inputs, output }) => {
testsuite('Testcase $testcaseIndex: $inputs.left + $inputs.right = $output', ({ inputs, output }) => {
expect(inputs.left + inputs.right).toBe(output);

@@ -15,0 +15,0 @@ });

Sorry, the diff of this file is not supported yet

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