mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-03 12:10:45 +05:30
16 lines
452 B
JavaScript
16 lines
452 B
JavaScript
import expect from 'unexpected';
|
|
|
|
describe('promise.prototype.finally', () => {
|
|
it('should be invoked after promise resolved', () =>
|
|
expect(new Promise((resolve) => {
|
|
Promise.resolve().finally(resolve)
|
|
}), 'to be fulfilled')
|
|
);
|
|
|
|
it('should be invoked after promise rejected', () =>
|
|
expect(new Promise((resolve) => {
|
|
Promise.reject().finally(resolve)
|
|
}), 'to be fulfilled')
|
|
);
|
|
});
|