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

@suitest/smst

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suitest/smst - npm Package Compare versions

Comparing version 3.0.5 to 4.0.0

2

dist/jsxFactory.js

@@ -1,1 +0,1 @@

var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define(["require","exports","unist-builder"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsx=t.assertUnknownTextNode=t.assertUnknownSectionNode=t.flatten=void 0;var n=__importDefault(e("unist-builder")),r=["text","code","subject","input"];function o(e,t){return e.reduce((function(e,o){if(null==o)return e;"string"!=typeof o&&"boolean"!=typeof o&&"number"!=typeof o||(o=n.default(r.includes(t)?t:"text",String(o)));var u,a=e[e.length-1];return"object"==typeof(u=o)&&null!==u&&r.includes(u.type)&&(null==a?void 0:a.type)===o.type?e.splice(e.length-1,1,{type:o.type,value:a.value+o.value}):e.push(o),e}),[])}t.flatten=function(e){return Array.isArray(e)?e.reduce((function(e,n){return e.concat(t.flatten(n))}),[]):[e]};var u=function(e){return o(t.flatten([e]),"text")},a=function(e){var t=u(e.name);return l(e.expectedValue)?n.default("prop",{name:t,contentType:"block",expectedValue:e.expectedValue,comparator:e.comparator,status:e.status}):n.default("prop",{name:t,contentType:"inline",expectedValue:u(e.expectedValue),actualValue:e.actualValue,comparator:e.comparator,status:e.status})},s=function(e){return e.every((function(e){return"prop"===e.type}))},l=function(e){return!Array.isArray(e)&&"object"==typeof e&&null!==e&&"code-block"===e.type},i=function(e){return e.every((function(e){return"test-line"===e.type}))},c=function(e){throw new Error("Unknown intrinsic element type "+e)};t.assertUnknownSectionNode=function(e){throw new Error("Unknown node type: "+JSON.stringify(e))},t.assertUnknownTextNode=function(e){throw new Error("Unknown plain text node: "+JSON.stringify(e))},t.jsx=function(e,r){for(var l,p,f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];var y=o(t.flatten(f),e);switch(e){case"text":case"subject":case"input":case"code":return y[0];case"fragment":return y;case"link":var v=r.href,h=y[0];return n.default("link",{href:v},null!==(l=null==h?void 0:h.value)&&void 0!==l?l:"");case"code-block":var m=r,x=y[0],w=null!==(p=null==m?void 0:m.language)&&void 0!==p?p:"javascript";return n.default("code-block",{language:w},x.value);case"prop":return a(r);case"props":if(s(y))return n.default("props",y);throw new TypeError("Props can only accept Prop as its child");case"condition":case"test-line":var g=r,b={title:u(g.title)};return g.status&&(b.status=g.status),n.default(e,b,y);case"test-line-result":var k=r;if(i(y)&&1===y.length)return n.default("test-line-result",{status:k.status,message:u(k.message),screenshot:k.screenshot},y);throw new TypeError("TestLineResult expects a single child of type TestLine");default:return c(e)}}}));
var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define(["require","exports","unist-builder"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsx=t.assertUnknownTextNode=t.assertUnknownSectionNode=t.flatten=void 0;var n=__importDefault(e("unist-builder")),r=["text","code","subject","input"];function o(e,t){return e.reduce((function(e,o){if(null==o)return e;"string"!=typeof o&&"boolean"!=typeof o&&"number"!=typeof o||(o=n.default(r.includes(t)?t:"text",String(o)));var u,a=e[e.length-1];return"object"==typeof(u=o)&&null!==u&&r.includes(u.type)&&(null==a?void 0:a.type)===o.type?e.splice(e.length-1,1,{type:o.type,value:a.value+o.value}):e.push(o),e}),[])}t.flatten=function(e){return Array.isArray(e)?e.reduce((function(e,n){return e.concat(t.flatten(n))}),[]):[e]};var u=function(e){return o(t.flatten([e]),"text")},a=function(e){var t=u(e.name);return l(e.expectedValue)?n.default("prop",{name:t,contentType:"block",expectedValue:e.expectedValue,comparator:e.comparator,status:e.status}):n.default("prop",{name:t,contentType:"inline",expectedValue:u(e.expectedValue),actualValue:e.actualValue,comparator:e.comparator,status:e.status})},s=function(e){return e.every((function(e){return"prop"===e.type}))},l=function(e){return!Array.isArray(e)&&"object"==typeof e&&null!==e&&"code-block"===e.type},c=function(e){return e.every((function(e){return"test-line"===e.type}))},i=function(e){throw new Error("Unknown intrinsic element type "+e)};t.assertUnknownSectionNode=function(e){throw new Error("Unknown node type: "+JSON.stringify(e))},t.assertUnknownTextNode=function(e){throw new Error("Unknown plain text node: "+JSON.stringify(e))},t.jsx=function(e,r){for(var l,p,f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];var y=o(t.flatten(f),e);switch(e){case"text":case"subject":case"input":case"code":return y[0];case"fragment":return y;case"link":var v=r.href,h=y[0];return n.default("link",{href:v},null!==(l=null==h?void 0:h.value)&&void 0!==l?l:"");case"code-block":var m=r,x=y[0],w=null!==(p=null==m?void 0:m.language)&&void 0!==p?p:"javascript";return n.default("code-block",{language:w},x.value);case"prop":return a(r);case"props":if(s(y))return n.default("props",y);throw new TypeError("Props can only accept Prop as its child");case"condition":case"test-line":var g=r,b={title:u(g.title)};return g.status&&(b.status=g.status),g.docs&&(b.docs=g.docs),n.default(e,b,y);case"test-line-result":var k=r;if(c(y)&&1===y.length)return n.default("test-line-result",{status:k.status,message:u(k.message),screenshot:k.screenshot},y);throw new TypeError("TestLineResult expects a single child of type TestLine");default:return i(e)}}}));
{
"name": "@suitest/smst",
"version": "3.0.5",
"version": "4.0.0",
"description": "UNIST definition and JSX factory for Suitest test lines rendering",

@@ -5,0 +5,0 @@ "homepage": "https://suite.st/",

type SingleNode = import('./unistTestLine').SingleNode;
type Node = import('./unistTestLine').Node;
type LinkNode = import('./unistTestLine').LinkNode;
type CodeBlockLanguage = import('./unistTestLine').CodeBlockLanguage;

@@ -53,2 +54,3 @@ type SingleEntryStatus = import('./unistTestLine').SingleEntryStatus;

status?: TestLineResultStatus,
docs?: LinkNode,
},

@@ -55,0 +57,0 @@ 'test-line-result': {

@@ -66,3 +66,3 @@ export type TextNode = {

export type TestLineResultStatus = 'success' | 'fatal' | 'fail' | 'warning' | 'exit' | 'excluded';
export type TestLineResultStatus = 'success' | 'fatal' | 'fail' | 'warning' | 'exit' | 'excluded' | 'aborted';

@@ -74,2 +74,3 @@ export type TestLineNode = {

status?: TestLineResultStatus,
docs?: LinkNode,
};

@@ -101,1 +102,3 @@

export type Node = SingleNode | SingleNode[];
export type Verbosity = 'quiet' | 'normal' | 'verbose';
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