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

chai-baseline

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-baseline - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

2

dist/index.d.ts

@@ -33,4 +33,6 @@ /// <reference types="node" />

reference?: string;
/** Whether to show file contents (rather than file names) when a reference or local baseline is missing. */
showFileContentsWhenMissing?: boolean;
}
export declare function chaiBaseline(chai: Chai.ChaiStatic, utils: Chai.UtilsStatic): void;
export default chaiBaseline;

27

dist/index.js

@@ -13,17 +13,2 @@ "use strict";

exports.chaiBaseline = void 0;
/*!
* Copyright 2016 Ron Buckton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const fs = require("fs");

@@ -61,2 +46,10 @@ const path = require("path");

utils.flag(this, "object", local);
if (!options.showFileContentsWhenMissing) {
if (local === undefined && reference !== undefined) {
this.assert(false, `Reference baseline exists for '${file}', but no local output was generated.`, `Reference baseline exists for '${file}', but local output was generated.`, localFile, "<no file>", false);
}
if (reference === undefined && local !== undefined) {
this.assert(false, `Local output was generated, but no reference baseline exists for '${file}'.`, `Local output was generated, but reference baseline exists for '${file}'.`, "<no file>", localFile, false);
}
}
try {

@@ -66,4 +59,4 @@ this.equals(reference);

catch (e) {
e.expected = reference || "";
e.actual = local || "";
e.expected = reference;
e.actual = local;
e.showDiff = true;

@@ -70,0 +63,0 @@ throw e;

{
"name": "chai-baseline",
"version": "1.1.1",
"version": "1.2.0",
"description": "File-based baseline testing for chai",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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