Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
Disable the lint for these lines as I want to explicity test the CallRecords
  • Loading branch information
unional committed Jan 6, 2018
1 parent 67ed277 commit 502c716
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/spy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ const resolve = x => Promise.resolve(x)

test('then() will receive result from promise', t => {
const spied = spyAsync(resolve)
// tslint:disable-next-line
spied(1)
return spied.calls[0].then(x => t.is(x, 1))
})

test('result from promise can be retrieved from await on the call', async t => {
const spied = spyAsync(resolve)
// tslint:disable-next-line
spied(1)
t.is(await spied.calls[0], 1)
})
Expand All @@ -71,6 +73,7 @@ const reject = x => Promise.reject(x)

test('throws() will receive error thrown by promise', t => {
const spied = spyAsync(reject)
// tslint:disable-next-line
spied(1)
return spied.calls[0].throws(x => t.is(x, 1))
})
Expand Down
5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
},
"buildOnSave": false,
"compileOnSave": false,
"compilerOptions": {
"plugins": [
{ "name": "tslint-language-service"}
]
},
"include": [
"src"
]
Expand Down

0 comments on commit 502c716

Please sign in to comment.