Skip to content
Prev Previous commit
Next Next commit
Clean up tests
  • Loading branch information
Danny McCormick committed Jun 5, 2019
commit 950b8a87e8980a2cb3dda66c017ea24dffce8bd5
5 changes: 2 additions & 3 deletions packages/tool-cache/__tests__/tool-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import * as path from 'path'
import * as io from '@actions/io'
import * as exec from '@actions/exec'

'use strict'

const cachePath = path.join(__dirname, 'CACHE')
const tempPath = path.join(__dirname, 'TEMP')
// Set temp and tool directories before running
Expand Down Expand Up @@ -72,10 +70,11 @@ describe('@actions/tool-cache', function() {
password: 'file'
})

expect.assertions(2)

try {
const errorCodeUrl = 'http://example.com/bytes/bad'
await tc.downloadTool(errorCodeUrl)
throw new Error('Should have failed')
} catch (err) {
expect(err.toString()).toContain('Unexpected HTTP response: 400')
expect(err['httpStatusCode']).toBe(400)
Expand Down