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

angular2-http-testing

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-http-testing - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

6

index.js

@@ -1,2 +0,6 @@

export * from './src/fake-backend';
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require("./src/fake-backend"));
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "angular2-http-testing",
"version": "1.0.4",
"version": "1.0.5",
"description": "Angular 2 Http testing helper library",

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

@@ -1,2 +0,3 @@

import { Response, ResponseOptions, Headers } from '@angular/http';
"use strict";
var http_1 = require("@angular/http");
function stringifyBody(body) {

@@ -17,3 +18,3 @@ return typeof body === 'string'

if (status === void 0) { status = 200; }
this.responseOptions = new ResponseOptions({ status: status, body: body, headers: new Headers(headers) });
this.responseOptions = new http_1.ResponseOptions({ status: status, body: body, headers: new http_1.Headers(headers) });
};

@@ -35,3 +36,3 @@ BackendExpectation.prototype.respondWithError = function (error) {

if (!this.responseError) {
connection.mockRespond(new Response(this.responseOptions));
connection.mockRespond(new http_1.Response(this.responseOptions));
}

@@ -44,3 +45,3 @@ else {

}());
export { BackendExpectation };
exports.BackendExpectation = BackendExpectation;
//# sourceMappingURL=backend-expectation.js.map

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

"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -6,5 +7,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
import { MockBackend } from '@angular/http/testing';
import { Http, BaseRequestOptions, RequestMethod, Headers } from '@angular/http';
import { BackendExpectation } from './backend-expectation';
var testing_1 = require("@angular/http/testing");
var http_1 = require("@angular/http");
var backend_expectation_1 = require("./backend-expectation");
var FakeBackend = (function (_super) {

@@ -28,9 +29,9 @@ __extends(FakeBackend, _super);

FakeBackend,
BaseRequestOptions,
http_1.BaseRequestOptions,
{
provide: Http,
provide: http_1.Http,
useFactory: function (backend, defaultOptions) {
return new Http(backend, defaultOptions);
return new http_1.Http(backend, defaultOptions);
},
deps: [FakeBackend, BaseRequestOptions]
deps: [FakeBackend, http_1.BaseRequestOptions]
}

@@ -47,3 +48,3 @@ ];

body: body,
headers: new Headers(headers)
headers: new http_1.Headers(headers)
});

@@ -54,4 +55,4 @@ };

url: url,
method: RequestMethod.Get,
headers: new Headers(headers)
method: http_1.RequestMethod.Get,
headers: new http_1.Headers(headers)
});

@@ -62,5 +63,5 @@ };

url: url,
method: RequestMethod.Post,
method: http_1.RequestMethod.Post,
body: body,
headers: new Headers(headers)
headers: new http_1.Headers(headers)
});

@@ -71,5 +72,5 @@ };

url: url,
method: RequestMethod.Put,
method: http_1.RequestMethod.Put,
body: body,
headers: new Headers(headers)
headers: new http_1.Headers(headers)
});

@@ -80,5 +81,5 @@ };

url: url,
method: RequestMethod.Delete,
method: http_1.RequestMethod.Delete,
body: body,
headers: new Headers(headers)
headers: new http_1.Headers(headers)
});

@@ -93,3 +94,3 @@ };

FakeBackend.prototype._addExpectation = function (options) {
var expectation = new BackendExpectation(options);
var expectation = new backend_expectation_1.BackendExpectation(options);
this._expectations.push(expectation);

@@ -102,4 +103,4 @@ return expectation;

return FakeBackend;
}(MockBackend));
export { FakeBackend };
}(testing_1.MockBackend));
exports.FakeBackend = FakeBackend;
//# sourceMappingURL=fake-backend.js.map
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"module": "commonjs",
"moduleResolution": "node",

@@ -6,0 +6,0 @@ "declaration": true,

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc