UNPKG

@itk-wasm/dam

Version:
21 lines (17 loc) 554 B
import test from 'ava' import path from 'path' import { spawnSync } from 'child_process' import { fileURLToPath } from 'url' test('pack packs', t => { const testDir = 'test' const cliPath = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'cli.js') const archivePath = path.join(testDir, 'pack.tar.gz') const packRun = spawnSync('node', [cliPath, 'pack', path.join(testDir, 'data'), archivePath], { env: process.env, stdio: ['inherit', 'pipe', 'inherit'], }) if (packRun.status !== 0) { t.fail() } t.pass() })