mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-22 02:14:17 +00:00
test: migration from Python to JavaScript
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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()
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user