Comparing version 0.3.7 to 0.3.8
@@ -130,2 +130,3 @@ 'use strict'; | ||
then: function (successFn, failFn) { | ||
successFn = _this._prepareListener(successFn); | ||
return createStoppablePromise(currPromise.then(successFn, failFn)); | ||
@@ -203,2 +204,4 @@ } | ||
* from children cursors. | ||
* It also applied to successFn of `then` of returned by | ||
* `observer` stoper object. | ||
* @param {Function} listener | ||
@@ -205,0 +208,0 @@ * @return {Promise} |
@@ -77,3 +77,4 @@ import _size from 'lodash/collection/size'; | ||
stop: stopper, | ||
then: function(successFn, failFn) { | ||
then: (successFn, failFn) => { | ||
successFn = this._prepareListener(successFn); | ||
return createStoppablePromise(currPromise.then(successFn, failFn)); | ||
@@ -159,2 +160,4 @@ }, | ||
* from children cursors. | ||
* It also applied to successFn of `then` of returned by | ||
* `observer` stoper object. | ||
* @param {Function} listener | ||
@@ -161,0 +164,0 @@ * @return {Promise} |
{ | ||
"name": "marsdb", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"author": { | ||
@@ -68,5 +68,5 @@ "name": "Artem Artemev", | ||
"scripts": { | ||
"test_some": "mocha --require babelhook --reporter spec --timeout 10000", | ||
"test_some": "mocha --require babelhook --reporter spec --timeout 1000", | ||
"test_browser": "gulp build:browser:tests && mocha-phantomjs --reporter spec browser_tests.html", | ||
"test": "mocha --require babelhook --reporter spec --timeout 10000 test/both test/node", | ||
"test": "mocha --require babelhook --reporter spec --timeout 1000 test/both test/node", | ||
"coverage": "istanbul cover _mocha --require babelhook test/both test/node -- -u exports -R spec && open coverage/lcov-report/index.html", | ||
@@ -73,0 +73,0 @@ "coveralls": "istanbul cover _mocha --require babelhook test/both test/node --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" |
@@ -216,2 +216,12 @@ import Collection from '../../lib/Collection'; | ||
it('should be invoked before `then` callback', function (done) { | ||
var invoked = false; | ||
db.find({$or: [{f: 1}, {f: 2}]}).observe(result => { | ||
invoked.should.be.equals(false); | ||
invoked = true; | ||
}).then(() => { | ||
invoked.should.be.equals(true); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
@@ -271,3 +281,3 @@ | ||
} | ||
}, 210); | ||
}, 310); | ||
}); | ||
@@ -274,0 +284,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1070091
24953