Skip to content

Commit

Permalink
Update dependencies (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch authored May 2, 2022
1 parent 745a395 commit 86214c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
"bin-wrapper": "^4.0.0"
},
"devDependencies": {
"ava": "^3.15.0",
"ava": "^4.2.0",
"bin-check": "^4.0.1",
"compare-size": "^3.0.0",
"execa": "^5.1.1",
"is-webp": "^1.0.0",
"read-chunk": "^3.2.0",
"tempy": "^2.0.0",
"xo": "^0.45.0"
"execa": "^6.1.0",
"is-webp": "^2.0.0",
"read-chunk": "^4.0.2",
"tempy": "^3.0.0",
"xo": "^0.48.0"
}
}
15 changes: 9 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import path from 'node:path';
import process from 'node:process';
import {fileURLToPath} from 'node:url';
import test from 'ava';
import execa from 'execa';
import tempy from 'tempy';
import {execa} from 'execa';
import {temporaryDirectory} from 'tempy';
import binCheck from 'bin-check';
import binBuild from 'bin-build';
import compareSize from 'compare-size';
import readChunk from 'read-chunk';
import {readChunk} from 'read-chunk';
import isWebp from 'is-webp';
import bin from '../index.js';

Expand All @@ -19,7 +19,7 @@ test('rebuild the gif2webp binaries', async t => {
return;
}

const temporary = tempy.directory();
const temporary = temporaryDirectory();
const source = fileURLToPath(new URL('../vendor/source/libwebp-1.1.0.tar.gz', import.meta.url));

await binBuild.file(source, [
Expand All @@ -35,7 +35,7 @@ test('return path to binary and verify that it is working', async t => {
});

test('convert a GIF to WebP', async t => {
const temporary = tempy.directory();
const temporary = temporaryDirectory();
const src = fileURLToPath(new URL('fixtures/test.gif', import.meta.url));
const dest = path.join(temporary, 'test.webp');
const args = [
Expand All @@ -48,5 +48,8 @@ test('convert a GIF to WebP', async t => {
const result = await compareSize(src, dest);

t.true(result[dest] < result[src]);
t.true(isWebp(await readChunk(dest, 0, 12)));
t.true(isWebp(await readChunk(dest, {
length: 12,
startPosition: 0,
})));
});

0 comments on commit 86214c0

Please sign in to comment.