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

angular-mock-record

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-mock-record - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

2

package.json
{
"name": "angular-mock-record",
"version": "1.5.0",
"version": "1.5.1",
"description": "An angular / protractor framework that mocks and records requests. Requests can be manually mocked or recorded like VCR.",

@@ -5,0 +5,0 @@ "main": "server.js",

@@ -11,8 +11,10 @@ class Http {

return new Promise((resolve, reject) => {
let headers = this.setRequestHeaders(req.headers, _session_id);
this.http.get(
{
json: true,
jar: true,
url: this.config.domain + req.url,
jar: true,
headers: this.setRequestHeaders(req.headers, _session_id)
headers: headers
}, (error, response, body) => {

@@ -62,6 +64,2 @@

this.config.request_headers.forEach(header => {
out[header] = requestHeaders[header];
});
return out;

@@ -68,0 +66,0 @@ }

@@ -27,4 +27,4 @@ const Utilities = require('./utilities.js');

let recording = this.isRecordingOnTape(requestUrl, tape);
let recordingWithDomain = recording ? recording.find(rec => rec.domain === this.config.domain) : null;
let recordingWithContext = recording ? recording.find(rec => rec.context === this.config.context) : null;
let recordingWithDomain = recording ? recording.find(rec => !!(rec.domain === this.config.domain && !rec.context)) : null;
let recordingWithContext = recording ? recording.find(rec => !!(rec.context === this.config.context && rec.domain === this.config.domain)) : null;
let shouldCheckContext = this.config.context;

@@ -40,3 +40,3 @@

// If no context and domain, use the domain recording
} else if (!shouldCheckContext && recordingWithDomain) {
} else if (!shouldCheckContext && recordingWithDomain && !recordingWithDomain.context) {

@@ -43,0 +43,0 @@ out = recordingWithDomain;

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