Files
sogo/Tests/spec/SogoToolSpec.js
2021-11-04 16:43:35 -04:00

24 lines
584 B
JavaScript

import config from '../lib/config'
import { mkdtempSync, rmSync } from 'fs'
const os = require('os')
const path = require('path')
const { execSync } = require('child_process')
describe('sogo-tool tests', function() {
let tmpdir
beforeEach(function() {
tmpdir = mkdtempSync(path.join(os.tmpdir(), 'sogo-'))
})
afterEach(function() {
rmSync(tmpdir, { recursive: true, force: true })
})
it('backup', async function() {
execSync(`sogo-tool backup ${tmpdir} ${config.username}`, (error, stdout, stderr) => {
expect(error).not.toBeDefined()
})
})
})