diff --git a/lib/install.js b/lib/install.js index 8ce6d51..dcdbd9d 100644 --- a/lib/install.js +++ b/lib/install.js @@ -2,7 +2,11 @@ import {fileURLToPath} from 'node:url'; import binBuild from 'bin-build'; import bin from './index.js'; -bin.run(['--verbose']).then(() => { +const src = fileURLToPath(new URL('../test/fixtures/test.jpg', import.meta.url)); +const dest = fileURLToPath(new URL('../test/fixtures/dest.jpg', import.meta.url)); + +// This should not be checked this way, but the `--verbose` flag ends with 1 +bin.run([src, dest]).then(() => { console.log('guetzli pre-build test passed successfully'); }).catch(async error => { console.warn(error.message); diff --git a/test/test.js b/test/test.js index 5f83660..c5f0204 100644 --- a/test/test.js +++ b/test/test.js @@ -30,7 +30,9 @@ test('rebuild the guetzli binaries', async t => { test('return path to binary and verify that it is working', async t => { const src = fileURLToPath(new URL('fixtures/test.jpg', import.meta.url)); - t.true(await binCheck(guetzli, [src, '/dev/null'])); + const dest = fileURLToPath(new URL('fixtures/dest.jpg', import.meta.url)); + + t.true(await binCheck(guetzli, [src, dest])); }); test('minify a JPG', async t => {