Skip to content

Commit

Permalink
Fix installation (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch authored Oct 24, 2021
1 parent 24b0a51 commit 6ece547
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 6ece547

Please sign in to comment.