Add tests

This commit is contained in:
Danny McCormick 2019-08-06 15:27:51 -04:00
parent f1da8b89e2
commit 40a00ae373
3 changed files with 85 additions and 11 deletions

View file

@ -4,7 +4,7 @@ import os = require('os');
import path = require('path');
const toolDir = path.join(
process.cwd(),
__dirname,
'runner',
path.join(
Math.random()
@ -14,7 +14,7 @@ const toolDir = path.join(
'tools'
);
const tempDir = path.join(
process.cwd(),
__dirname,
'runner',
path.join(
Math.random()
@ -36,15 +36,6 @@ describe('installer tests', () => {
await io.rmRF(tempDir);
}, 100000);
afterAll(async () => {
try {
await io.rmRF(toolDir);
await io.rmRF(tempDir);
} catch {
console.log('Failed to remove test directories');
}
}, 100000);
it('Acquires version of node if no matching version is installed', async () => {
await installer.getNode('10.16.0');
const nodeDir = path.join(toolDir, 'node', '10.16.0', os.arch());