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.0.0 to 1.1.0

6

package.json
{
"name": "jest-each-table",
"version": "1.0.0",
"version": "1.1.0",
"description": "Create a test-case table for use with Jest's test.each tagged template literal",
"author": "Cameron Hunter <hello@cameronhunter.co.uk>",
"repository": {
"type": "git",
"url": "ssh://git@github.com:cameronhunter/jest-each-table.git"
},
"license": "MIT",

@@ -7,0 +11,0 @@ "main": "./src/index.js",

7

src/index.js

@@ -5,3 +5,3 @@ const Separator = '|';

const keys = testcases.reduce((state, object) => new Set([...state, ...Object.keys(object)]), new Set());
return [...keys];
return ['#', ...keys];
}

@@ -11,3 +11,6 @@

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

@@ -14,0 +17,0 @@ );

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

testsuite('$inputs.left + $inputs.right = $output', ({ inputs, output }) => {
testsuite('Testcase $#: $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