Skip to content

Commit 44bab2c

Browse files
committed
fixing #12
1 parent 315bedb commit 44bab2c

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"new-cap": "error",
1414
"no-console": "error",
1515
"comma-dangle": "error",
16+
"no-shadow": "error",
1617
"indent": [
1718
"error",
1819
4,

lib/adapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @class PromiseAdapter
55
* @description
66
* Adapter for the primary promise operations.
7-
*
7+
*
88
* Provides compatibility with promise libraries that cannot be recognized automatically,
99
* via functions that implement the primary operations with promises:
1010
*
@@ -49,7 +49,7 @@
4949
* Passing in anything other than a function will throw `Adapter requires a function to reject a promise.`
5050
*
5151
* @see {@tutorial client}
52-
*
52+
*
5353
* @returns {PromiseAdapter}
5454
*/
5555
function PromiseAdapter(create, resolve, reject) {

lib/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ function parsePromiseLib(lib) {
103103
}
104104

105105
main.PromiseAdapter = require('./adapter');
106+
main.errors = npm.errors;
107+
106108
Object.freeze(main);
107109

108110
module.exports = main;

test/mainSpec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ describe('Main - positive', function () {
6363
beforeEach(function () {
6464
inst = lib.main(promise);
6565
});
66-
it('must be complete', function () {
66+
it('must contain all pre-initialization properties', function () {
67+
expect(lib.main.errors).toBe(inst.errors);
68+
});
69+
it('must contain all post-initialization properties', function () {
6770
expect(PromiseAdapter instanceof Function).toBe(true);
6871
expect(inst && typeof inst === 'object').toBe(true);
6972
expect(inst.batch instanceof Function).toBe(true);

0 commit comments

Comments
 (0)