@@ -5,15 +5,17 @@ import { getBinaryPath, getDownloadObject } from './utils';
55jest . mock ( 'os' ) ;
66const mockedOs = jest . mocked ( os ) ;
77
8- const platforms = [ 'darwin' , 'linux' , 'win32' ] as const ;
9- const architectures = [ 'arm' , 'x32' , 'x64' ] as const ;
8+ const platforms : NodeJS . Platform [ ] = [ 'darwin' , 'linux' , 'win32' ] ;
9+ const architectures = [ 'arm' , 'x32' , 'x64' ] as NodeJS . Architecture [ ] ;
1010
1111const table = platforms . reduce (
1212 ( testSuites , os ) => [
1313 ...testSuites ,
14- ...architectures . map ( ( arch ) => [ os , arch ] as [ string , string ] ) ,
14+ ...architectures . map (
15+ ( arch ) => [ os , arch ] as [ NodeJS . Platform , NodeJS . Architecture ] ,
16+ ) ,
1517 ] ,
16- [ ] as [ string , string ] [ ] ,
18+ [ ] as [ NodeJS . Platform , NodeJS . Architecture ] [ ] ,
1719) ;
1820
1921describe ( 'getDownloadObject' , ( ) => {
@@ -22,7 +24,7 @@ describe('getDownloadObject', () => {
2224
2325 beforeEach ( ( ) => {
2426 jest . resetAllMocks ( ) ;
25- mockedOs . platform . mockReturnValueOnce ( os as NodeJS . Platform ) ;
27+ mockedOs . platform . mockReturnValueOnce ( os ) ;
2628 mockedOs . arch . mockReturnValueOnce ( arch ) ;
2729 } ) ;
2830
0 commit comments