diff --git a/test/direct-100-hard-tabbed.js b/test/direct-100-hard-tabbed.js index 6f364c8..3acfc77 100644 --- a/test/direct-100-hard-tabbed.js +++ b/test/direct-100-hard-tabbed.js @@ -1,25 +1,21 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const tabbed = readFileSync('test/fixtures/in/tabbed.txt').toString() for (const right of [0, 1, 5]) { for (const left of [0, 1, 2, 5, 10]) { - test(`Direct: Hard wrap tabbed source to w${width} l${left} r${right}`, async t => { + test(`Direct: Hard wrap tabbed source to w${width} l${left} r${right}`, t => { const renderer = truwrap({ left, right, width, - mode: 'hard' + mode: 'hard', }) renderer.write(tabbed) t.snapshot(renderer.end()) diff --git a/test/direct-100-hard.js b/test/direct-100-hard.js index 8174422..e132719 100644 --- a/test/direct-100-hard.js +++ b/test/direct-100-hard.js @@ -1,25 +1,21 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() for (const right of [0, 1, 5]) { for (const left of [0, 1, 2, 5, 10]) { - test(`Direct: Hard wrap to w${width} l${left} r${right}`, async t => { + test(`Direct: Hard wrap to w${width} l${left} r${right}`, t => { const renderer = truwrap({ left, right, width, - mode: 'hard' + mode: 'hard', }) renderer.write(lorem) t.snapshot(renderer.end()) diff --git a/test/direct-100-keep.js b/test/direct-100-keep.js index d5e0f29..0232c31 100644 --- a/test/direct-100-keep.js +++ b/test/direct-100-keep.js @@ -1,26 +1,21 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 -const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() const ls = readFileSync('test/fixtures/in/ls.txt').toString() for (const right of [0, 1, 5]) { for (const left of [0, 1, 2, 5, 10]) { - test(`Direct: Keep wrap to w${width} l${left} r${right}`, async t => { + test(`Direct: Keep wrap to w${width} l${left} r${right}`, t => { const renderer = truwrap({ left, right, width, - mode: 'keep' + mode: 'keep', }) renderer.write(ls) t.snapshot(renderer.end()) diff --git a/test/direct-100-panel.js b/test/direct-100-panel.js index 0cfba9d..21cefa9 100644 --- a/test/direct-100-panel.js +++ b/test/direct-100-panel.js @@ -1,31 +1,27 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap, parsePanel} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const panel = readFileSync('test/fixtures/in/panel.txt').toString() if ([40, 60, 80, 100].includes(Number(width))) { - test(`Direct: Panel w${width} l0 r0`, async t => { + test(`Direct: Panel w${width} l0 r0`, t => { const renderer = truwrap({ left: 0, right: 0, width, - mode: 'soft' + mode: 'soft', }) const panelSource = parsePanel(panel, '|', renderer.getWidth()) const panelOptions = { maxLineWidth: renderer.getWidth(), showHeaders: false, truncate: false, - config: panelSource.configuration + config: panelSource.configuration, } renderer.panel(panelSource.content, panelOptions) t.snapshot(renderer.end()) diff --git a/test/direct-100-soft-tabbed.js b/test/direct-100-soft-tabbed.js index 93fead3..f368702 100644 --- a/test/direct-100-soft-tabbed.js +++ b/test/direct-100-soft-tabbed.js @@ -1,26 +1,21 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 -const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() const tabbed = readFileSync('test/fixtures/in/tabbed.txt').toString() for (const right of [0, 1, 5]) { for (const left of [0, 1, 2, 5, 10]) { - test(`Direct: Soft wrap tabbed source to w${width} l${left} r${right}`, async t => { + test(`Direct: Soft wrap tabbed source to w${width} l${left} r${right}`, t => { const renderer = truwrap({ left, right, width, - mode: 'soft' + mode: 'soft', }) renderer.write(tabbed) t.snapshot(renderer.end()) diff --git a/test/direct-100-soft.js b/test/direct-100-soft.js index 10f3ddc..0122939 100644 --- a/test/direct-100-soft.js +++ b/test/direct-100-soft.js @@ -1,25 +1,21 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() for (const right of [0, 1, 5]) { for (const left of [0, 1, 2, 5, 10]) { - test(`Direct: Soft wrap to w${width} l${left} r${right}`, async t => { + test(`Direct: Soft wrap to w${width} l${left} r${right}`, t => { const renderer = truwrap({ left, right, width, - mode: 'soft' + mode: 'soft', }) renderer.write(lorem) t.snapshot(renderer.end()) diff --git a/test/stream-100-hard-tabbed.js b/test/stream-100-hard-tabbed.js index fcd1c8d..65e46d4 100644 --- a/test/stream-100-hard-tabbed.js +++ b/test/stream-100-hard-tabbed.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const tabbed = readFileSync('test/fixtures/in/tabbed.txt').toString() @@ -24,7 +20,7 @@ for (const right of [0, 1, 5]) { right, width, mode: 'hard', - outStream: StreamProxy + outStream: StreamProxy, }) const buffered = await new Promise(resolve => { diff --git a/test/stream-100-hard.js b/test/stream-100-hard.js index 9aa2bce..8c19929 100644 --- a/test/stream-100-hard.js +++ b/test/stream-100-hard.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() @@ -24,7 +20,7 @@ for (const right of [0, 1, 5]) { right, width, mode: 'hard', - outStream: StreamProxy + outStream: StreamProxy, }) const buffered = await new Promise(resolve => { diff --git a/test/stream-100-keep.js b/test/stream-100-keep.js index 01cf2c1..aef067a 100644 --- a/test/stream-100-keep.js +++ b/test/stream-100-keep.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const ls = readFileSync('test/fixtures/in/ls.txt').toString() @@ -24,7 +20,7 @@ for (const right of [0, 1, 5]) { right, width, mode: 'keep', - outStream: StreamProxy + outStream: StreamProxy, }) const buffered = await new Promise(resolve => { diff --git a/test/stream-100-panel.js b/test/stream-100-panel.js index 66d307a..7835fd3 100644 --- a/test/stream-100-panel.js +++ b/test/stream-100-panel.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap, parsePanel} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const panel = readFileSync('test/fixtures/in/panel.txt').toString() @@ -23,7 +19,7 @@ if ([40, 60, 80, 100].includes(Number(width))) { right: 0, width, mode: 'soft', - outStream: StreamProxy + outStream: StreamProxy, }) const panelSource = parsePanel(panel, '|', renderer.getWidth()) @@ -32,7 +28,7 @@ if ([40, 60, 80, 100].includes(Number(width))) { maxLineWidth: renderer.getWidth(), showHeaders: false, truncate: false, - config: panelSource.configuration + config: panelSource.configuration, } const buffered = await new Promise(resolve => { diff --git a/test/stream-100-soft-tabbed.js b/test/stream-100-soft-tabbed.js index f8b5b7f..bdd3c53 100644 --- a/test/stream-100-soft-tabbed.js +++ b/test/stream-100-soft-tabbed.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const tabbed = readFileSync('test/fixtures/in/tabbed.txt').toString() @@ -24,7 +20,7 @@ for (const right of [0, 1, 5]) { right, width, mode: 'soft', - outStream: StreamProxy + outStream: StreamProxy, }) const buffered = await new Promise(resolve => { diff --git a/test/stream-100-soft.js b/test/stream-100-soft.js index a541772..915396b 100644 --- a/test/stream-100-soft.js +++ b/test/stream-100-soft.js @@ -2,13 +2,9 @@ import {basename} from 'node:path' import {fileURLToPath} from 'node:url' import {readFileSync} from 'node:fs' import {PassThrough} from 'node:stream' -import {promisify} from 'node:util' -import {exec} from 'node:child_process' import test from 'ava' import {truwrap} from '../index.js' -const execPromise = promisify(exec) - const width = basename(fileURLToPath(import.meta.url), '.js').split('-')[1] // 10, 20, 40, 60, 80, 100 const lorem = readFileSync('test/fixtures/in/lorem.txt').toString() @@ -24,7 +20,7 @@ for (const right of [0, 1, 5]) { right, width, mode: 'soft', - outStream: StreamProxy + outStream: StreamProxy, }) const buffered = await new Promise(resolve => {