Author: ygrego Date: 2015-04-27 14:40:30 +0000 (Mon, 27 Apr 2015) New Revision: 1266 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1266 Log: Addition of method "waitForError". Modified: oipf/js/test/TestCase.js Modified: oipf/js/test/TestCase.js =================================================================== --- oipf/js/test/TestCase.js 2015-04-27 14:39:00 UTC (rev 1265) +++ oipf/js/test/TestCase.js 2015-04-27 14:40:30 UTC (rev 1266) @@ -20,6 +20,16 @@ assertNotNull: function(elmt) { return elmt; + }, + + waitForError: function(callback, resolve) { + new Promise(function(resolve, reject) { + callback(); + }) + .catch(function(val) { + console.log(val); + resolve(); + }); } });