jasmine-await
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -6,4 +6,4 @@ declare let itWithPromise: (expectation: string, assertion: () => any, timeout?: number) => void; | ||
declare let afterAllWithPromise: (action: () => any, timeout?: number) => void; | ||
declare let invert: (promise: Promise<any>) => Promise<any>; | ||
declare let invert: (promise: Promise<any>) => Promise<void>; | ||
export { itWithPromise as it, beforeEachWithPromise as beforeEach, afterEachWithPromise as afterEach, beforeAllWithPromise as beforeAll, afterAllWithPromise as afterAll, invert }; | ||
export { await } from "asyncawait"; |
@@ -24,7 +24,3 @@ "use strict"; | ||
exports.afterAll = afterAllWithPromise; | ||
let invert = (promise) => { | ||
return promise.then(resolution => { | ||
return new Error(`Promise should be rejected, but it is resolved with: ${resolution}`); | ||
}, err => err); | ||
}; | ||
let invert = (promise) => promise.then(resolution => Promise.reject(new Error(`Promise should be rejected, but it is resolved with: ${resolution}`)), err => err); | ||
exports.invert = invert; | ||
@@ -31,0 +27,0 @@ var asyncawait_2 = require("asyncawait"); |
10
index.ts
@@ -32,7 +32,7 @@ import {async} from "asyncawait"; | ||
let invert = (promise: Promise<any>) => { | ||
return promise.then(resolution => { | ||
return new Error(`Promise should be rejected, but it is resolved with: ${resolution}`); | ||
}, err => err); | ||
}; | ||
let invert = (promise: Promise<any>) => | ||
promise.then( | ||
resolution => Promise.reject(new Error(`Promise should be rejected, but it is resolved with: ${resolution}`)), | ||
err => err | ||
); | ||
@@ -39,0 +39,0 @@ export { |
{ | ||
"name": "jasmine-await", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Integrates asyncawait support into jasmine to write more concise specs", | ||
@@ -33,5 +33,7 @@ "scripts": { | ||
"devDependencies": { | ||
"jasmine-ts": "^0.0.1", | ||
"jasmine-spec-reporter": "^2.4.0", | ||
"jasmine-ts": "^0.0.2", | ||
"tslint": "^3.8.1", | ||
"typings": "^0.8.1" | ||
} | ||
} |
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
7657
4
79