Po uaktualnieniu Mocha nie można nawet uruchomić prosty test oto kodDlaczego otrzymuję komunikat "Błąd: metoda rozdzielczości jest zbyt duża"?
const assert = require('assert');
it('should complete this test', function (done) {
return new Promise(function (resolve) {
assert.ok(true);
resolve();
})
.then(done);
});
Wziąłem ten kod z here
zrozumiałem, że teraz zgłasza wyjątek Error: Resolution method is overspecified. Specify a callback * or * return a Promise; not both.
Ale jak żeby to zadziałało? Nie zrozumiałem. Mam
node -v 6.9.4
mocha -v 3.2.0
Jak uruchomić ten kod są teraz w nowym, poprawnym formacie?