1
- import io = require( '@actions/io' ) ;
2
- import fs = require( 'fs' ) ;
3
- import os = require( 'os' ) ;
4
- import path = require( 'path' ) ;
1
+ import * as io from "@actions/io" ;
2
+ import * as path from "path" ;
3
+ import * as installer from "../src/installer" ;
5
4
6
- const toolDir = path . join ( __dirname , 'runner' , 'tools' ) ;
7
- const tempDir = path . join ( __dirname , 'runner' , 'temp' ) ;
8
- const dataDir = path . join ( __dirname , 'data' ) ;
5
+ const toolDir = path . join ( __dirname , "runner" , "tools" ) ;
6
+ const tempDir = path . join ( __dirname , "runner" , "temp" ) ;
9
7
10
- process . env [ 'RUNNER_TOOL_CACHE' ] = toolDir ;
11
- process . env [ 'RUNNER_TEMP' ] = tempDir ;
12
- import * as installer from '../src/installer' ;
13
-
14
- const IS_WINDOWS = process . platform === 'win32' ;
15
-
16
- describe ( 'installer tests' , ( ) => {
8
+ process . env [ "RUNNER_TOOL_CACHE" ] = toolDir ;
9
+ process . env [ "RUNNER_TEMP" ] = tempDir ;
17
10
11
+ describe ( "installer tests" , ( ) => {
18
12
beforeAll ( async ( ) => {
19
13
await io . rmRF ( toolDir ) ;
20
14
await io . rmRF ( tempDir ) ;
@@ -25,13 +19,11 @@ describe('installer tests', () => {
25
19
await io . rmRF ( toolDir ) ;
26
20
await io . rmRF ( tempDir ) ;
27
21
} catch {
28
- console . log ( ' Failed to remove test directories' ) ;
22
+ console . log ( " Failed to remove test directories" ) ;
29
23
}
30
24
} , 100000 ) ;
31
25
32
- it ( 'Acquires opam source' , async ( ) => {
33
- await installer . getOpam ( '2.0.5' ) ;
34
- const OCamldir = path . join ( toolDir , 'opam' , '2.0.5' , os . arch ( ) ) ;
26
+ it ( "Acquires opam source" , async ( ) => {
27
+ await installer . getOpam ( "2.0.5" ) ;
35
28
} , 1000000 ) ;
36
-
37
29
} ) ;
0 commit comments