UNPKG

runtime-eol

Version:
28 lines (21 loc) 611 B
import checkVersion from '../index'; import fl from '../config'; import {argParser} from '../helpers/arg'; function verify(actual: unknown, expect: unknown){ if( expect !== actual ){ throw new Error(`${expect} NotEqual ${actual}`) } return true; } const run = async () => { try{ verify(fl.tag, 'failover'); verify(JSON.stringify(argParser(['a'])), '{"mode":"check","tools":[]}'); verify(await checkVersion({skipRemote: false, tools: ['python', 'sls']}), true); console.log('all good'); } catch(err){ console.error('err =', err) } }; run();