mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-07 20:51:11 +00:00
Add tests
This commit is contained in:
parent
f1da8b89e2
commit
40a00ae373
3 changed files with 85 additions and 11 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue