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

test-machinepack

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-machinepack - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "test-machinepack",
"author": "Mike McNeil <@mikermcneil>",
"version": "2.0.1",
"version": "2.0.2",
"description": "Raw test runner for machinepacks (also includes a simple stub test driver)",

@@ -6,0 +6,0 @@ "keywords": [

@@ -54,6 +54,7 @@ /**

// If configured input value is a string, but the machine is NOT expecting
// a string specifically, then attempt to parse.
var isExpectingString = (rttc.infer(inputDef.example) === 'string');
if (_.isString(valToUse) && !isExpectingString) {
// If configured input value is a string, but the machine is expecting
// a JSON value, then attempt to parse.
var typeSchema = rttc.infer(inputDef.example);
var isExpectingJson = (typeSchema !== 'string' && typeSchema !== 'number' && typeSchema !== 'boolean' && typeSchema !== 'lamda');
if (_.isString(valToUse) && isExpectingJson) {
try {

@@ -138,7 +139,6 @@ valToUse = JSON.parse(valToUse);

// If output assertion is a string, but the machine is NOT expecting
// a string specifically, then attempt to parse the output assertion
// before performing the check.
var isExpectingString = (typeSchema === 'string');
if (_.isString(outputAssertion) && !isExpectingString) {
// If output assertion is a string, but the machine is expecting JSON
// then attempt to parse the output assertion before performing the check.
var isExpectingJson = (typeSchema !== 'string' && typeSchema !== 'number' && typeSchema !== 'boolean' && typeSchema !== 'lamda');
if (_.isString(outputAssertion) && isExpectingJson) {
try {

@@ -145,0 +145,0 @@ outputAssertion = JSON.parse(outputAssertion);

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