Fix test description

This commit is contained in:
FujiHaruka
2018-12-16 01:07:09 +09:00
parent d2caf3bcdd
commit 3e630bc10f

View File

@ -12,11 +12,11 @@ test('Runs the function provided', () => {
const delay = promisify((d, cb) => setTimeout(cb, d));
return delay(200).then(() => expect(true).toBeTruthy());
});
test('Resolve a callback result', () => {
test('Resolves a callback result', () => {
const resolve1 = promisify(cb => cb(null, 1));
return expect(resolve1()).resolves.toBe(1);
});
test('Reject on error', () => {
test('Rejects on error', () => {
const reject = promisify(cb => cb('error', null));
return expect(reject()).rejects.toMatch('error');
});