Add isTask type guard to async/Task. #152

Merged
merged 2 commits into from Apr 26, 2016

Projects

None yet

5 participants

@kitsonk
Member
kitsonk commented Apr 22, 2016

Adds a Task type guard to async/Task

@kitsonk kitsonk Add isTask type guard to async/Task.
7dd34a1
@vansimke vansimke was assigned by kitsonk Apr 22, 2016
@kitsonk kitsonk added the enhancement label Apr 22, 2016
@kitsonk kitsonk added this to the 2016.04 milestone Apr 22, 2016
@kitsonk kitsonk assigned novemberborn and unassigned vansimke Apr 26, 2016
@novemberborn novemberborn commented on an outdated diff Apr 26, 2016
tests/unit/async/Task.ts
import Promise from 'src/Promise';
import { addPromiseTests } from '../Promise';
let suite = {
name: 'Task',
+ 'isTask()'() {
+ const task = new Task((resolve) => resolve(), () => {});
+ const promise = new Promise((resolve) => resolve());
@novemberborn
novemberborn Apr 26, 2016 Member

Nit: Promise.resolve() should suffice.

@codecov-io

Current coverage is 97.62%

Merging #152 into master will decrease coverage by -0.15%

@@           master    #152   diff @@
=====================================
  Files          53      53          
  Lines        2900    2902     +2   
  Methods       659     660     +1   
  Branches      555     556     +1   
=====================================
- Hits         2837    2833     -4   
- Misses         61      67     +6   
  Partials        2       2          
  1. File src/request/xhr.ts (not in diff) was modified. more
    • Misses +6
    • Partials 0
    • Hits -6

Sunburst

Powered by Codecov. Last updated by 563c832

@kitsonk kitsonk merged commit d471a49 into master Apr 26, 2016

1 check passed

jQuery Foundation CLA All authors have signed the CLA
Details
@kitsonk kitsonk deleted the feature-istask branch Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment