import * as assert from 'assert' ; import { VersionComparer } from './version-comparer' ; describe ( 'VersionComparer' , ( ) => { describe ( 'isNewerVersion' , ( ) => { it ( 'should report is newer version when old version is older than new version' , async ( ) => { const isNewerVersion = VersionComparer . isNewerVersion ( '2.0.3' , '2.0.4' ) ; assert . ok ( isNewerVersion ) ; expect ( isNewerVersion ) . toBeTruthy ( ) ; } ) ; it ( 'should not report is newer version when old version is same as new version' , async ( ) => { const isNewerVersion = VersionComparer . isNewerVersion ( '2.0.3' , '2.0.3' ) ; expect ( isNewerVersion ) . toBeFalsy ( ) ; } ) ; it ( 'should not report is newer version when old version is newer than new version' , async ( ) => { const isNewerVersion = VersionComparer . isNewerVersion ( '2.0.4' , '2.0.3' ) ; expect ( isNewerVersion ) . toBeFalsy ( ) ; } ) ; } ) ; } ) ;