accounts-frontend/packages/app/polyfills.test.js

13 lines
464 B
JavaScript
Raw Normal View History

import expect from 'app/test/unexpected';
describe('promise.prototype.finally', () => {
2020-05-24 04:38:24 +05:30
it('should be invoked after promise resolved', () =>
expect(new Promise((resolve) => Promise.resolve().finally(resolve)), 'to be fulfilled'));
2020-05-24 04:38:24 +05:30
it('should be invoked after promise rejected', () =>
expect(
new Promise((resolve) => expect(Promise.reject().finally(resolve), 'to be rejected')),
'to be fulfilled',
));
});