mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 10:21:22 +00:00
24 lines
584 B
JavaScript
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()
|
|
})
|
|
})
|
|
}) |