forked from zotero/zotero
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request zotero#1239 from tnajdek/master
Enable running tests against babelized code in build/dir
- Loading branch information
Showing
31 changed files
with
278 additions
and
6,837 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict'; | ||
|
||
var EXPORTED_SYMBOLS = ['Promise']; | ||
|
||
var Promise = require('bluebird/promise')(); | ||
|
||
Promise.config({ | ||
warnings: true, | ||
longStackTraces: true, | ||
cancellation: true | ||
}); | ||
|
||
// TEMP: Only turn on if debug logging enabled? | ||
Promise.onPossiblyUnhandledRejection((e, promise) => { | ||
if (e.name == 'ZoteroPromiseInterrupt' || e.handledRejection) { | ||
return; | ||
} | ||
|
||
typeof Zotero !== 'undefined' && Zotero.debug('Possibly unhandled rejection:\n\n' | ||
+ (e.message | ||
? e.message + "\n\n" + e.stack.split(/\n/) | ||
// Filter out internal Bluebird calls | ||
.filter(line => !line.includes('bluebird')) | ||
.join('\n') | ||
: e), 1); | ||
throw e; | ||
}); | ||
|
||
module.exports = Promise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.