Socket
Socket
Sign inDemoInstall

snapsnap

Package Overview
Dependencies
492
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

14

dist/integrations/jest/jest.js

@@ -43,2 +43,3 @@ "use strict";

var path_1 = __importDefault(require("path"));
var lodash_1 = __importDefault(require("lodash"));
var analyzer_1 = require("../../analyzer");

@@ -95,3 +96,3 @@ var reporter_1 = require("./reporter");

na = new analyzer_1.NockAnalyzer({
identifier: this.reporter.currentSpec.fullName,
identifier: this.getCleanTestFileName() + "-" + this.reporter.currentSpec.fullName,
snapshotPath: path_1.default.join(path_1.default.dirname(this.reporter.currentSpec.testPath), '__http__'),

@@ -107,2 +108,13 @@ });

};
JestIntegration.prototype.getCleanTestFileName = function () {
var fn = path_1.default.basename(this.reporter.currentSpec.testPath);
return lodash_1.default.reduce([
/.js$/,
/.ts$/,
/.jsx$/,
/.tsx$/,
/.test$/,
/.spec$/,
], function (aggregator, regex) { return aggregator.replace(regex, ''); }, fn);
};
return JestIntegration;

@@ -109,0 +121,0 @@ }());

4

package.json
{
"name": "snapsnap",
"version": "0.1.0",
"version": "0.1.1",
"description": "Tools for snapshotting, replaying, and mocking HTTP queries with Jest",

@@ -26,3 +26,3 @@ "main": "dist/index.js",

"test": "jest",
"prepublishOnly": "rm -rf ./dist && npm run build",
"prepublishOnly": "npm test && npm run lint && rm -rf ./dist && npm run build",
"lint:md": "remark .",

@@ -29,0 +29,0 @@ "lint:eslint": "eslint 'src/**/*.ts' '__tests__/**/*.ts'",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc