import * as assert from 'assert' ; import * as child_process from 'child_process' ; import * as rustup from '../../src/rustup' ; const rustupVersion = child_process . execSync ( 'rustup --version' ) . toString ( ) ; assert ( rustupVersion ) ; const config = { path : 'rustup' , channel : 'stable' , } ; suite ( 'Rustup Tests' , ( ) => { test ( 'getVersion' , async ( ) => { const version = await rustup . getVersion ( config ) ; assert ( rustupVersion . includes ( `rustup ${ version }` ) ) ; } ) ; test ( 'getActiveChannel' , async ( ) => { rustup . getActiveChannel ( '.' , config . path ) ; } ) ; } ) ;