import Sync from '../src/sync' import to from 'await-to-js' import { expect } from 'chai' import { it } from 'mocha' import logger from '@uci/logger' // pause = require('@uci/utils').pPause describe('Sync Class Testing ',async ()=> { let log = logger({}) before(async () => { // log = logger({ package:'@uci/sync', id: 'sync-test' }) let sync = new Sync() // await sync.loadJob('local') // console.log('command to be run',sync.command()) // console.log('===',sync.cwd()) // // sync.execute({cli:true}) // sync.live() // sync.execute({cli:true}) await sync.loadJob('local') console.log('command to be run',sync.command()) sync.live() sync.execute({cli:true}) // await sync.configure('./test/config/sync') // log.info({cmd:sync.command(), msg:'Rsync Command that will Run'}) // log.info(`making connection to ${remote.opts.host}`) // log.info('ready for testing') }) // after(async () => { // remote.close() // }) it('can sync a directory' , async function () { // let [err,res] = await to(remote.exec('cd /opt && pwd')) // if (err) { // log.info('error running command aborting test', err) // return // } // log.info(`result of remote command ${res.command} => ${res.reply.toString().trim()}`) expect('test', 'test failed').to.equal('/opt') }) }) // function hooks(remote) { // // // beforeEach(async() => { // // await someasyncfunctiontodobeforeeachtest() // // }) // // // after(async() => { // // await someasyncfunctiontodoaftereeachtest() // // }) // // }