boar-angular2-testing
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -5,2 +5,3 @@ import { MockBackend, MockConnection } from 'angular2/http/testing'; | ||
export { SyncMockBackendOptions } from './options'; | ||
export { Expectation } from './expectation'; | ||
export declare class SyncMockBackend extends MockBackend { | ||
@@ -12,2 +13,4 @@ private _expectations; | ||
static createWithAutoRespond(): SyncMockBackend; | ||
static createForExpectations(expectations: Expectation[], options?: SyncMockBackendOptions): SyncMockBackend; | ||
static createForExpectation(expectation: Expectation, options?: SyncMockBackendOptions): SyncMockBackend; | ||
autoRespond: boolean; | ||
@@ -14,0 +17,0 @@ every(): Expectation; |
@@ -22,2 +22,4 @@ "use strict"; | ||
exports.SyncMockBackendOptions = options_2.SyncMockBackendOptions; | ||
var expectation_2 = require('./expectation'); | ||
exports.Expectation = expectation_2.Expectation; | ||
var core_1 = require('angular2/core'); | ||
@@ -42,2 +44,12 @@ var SyncMockBackend = (function (_super) { | ||
}; | ||
SyncMockBackend.createForExpectations = function (expectations, options) { | ||
var backend = new SyncMockBackend(new options_1.SyncMockBackendOptions(options)); | ||
expectations.forEach(function (expectation) { return backend.prependWhen(expectation); }); | ||
return backend; | ||
}; | ||
SyncMockBackend.createForExpectation = function (expectation, options) { | ||
var backend = new SyncMockBackend(new options_1.SyncMockBackendOptions(options)); | ||
backend.prependWhen(expectation); | ||
return backend; | ||
}; | ||
Object.defineProperty(SyncMockBackend.prototype, "autoRespond", { | ||
@@ -44,0 +56,0 @@ get: function () { |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "1.3.0" | ||
"version": "1.4.0" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38236
462