diff --git a/package.json b/package.json
index bb43cc6..655dd2f 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
"description": "SVGO imagemin plugin",
"license": "MIT",
"repository": "imagemin/imagemin-svgo",
+ "funding": "https://github.com/sindresorhus/imagemin-svgo?sponsor=1",
"engines": {
"node": ">=6"
},
@@ -17,18 +18,17 @@
"compress",
"image",
"imageminplugin",
- "img",
"minify",
"optimize",
"svg",
"svgo"
],
"dependencies": {
- "is-svg": "^3.0.0",
- "svgo": "^1.0.5"
+ "is-svg": "^4.2.1",
+ "svgo": "^1.3.2"
},
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "^1.0.0",
+ "xo": "^0.20.0"
}
}
diff --git a/test.js b/test.js
index 96beef5..5102fe9 100644
--- a/test.js
+++ b/test.js
@@ -1,12 +1,13 @@
+/* eslint-disable ava/use-t-well */
import test from 'ava';
-import m from '.';
+import imageminSvgo from '.';
test('optimize a SVG', async t => {
- t.is((await m()('')).toString(), '');
+ t.is((await imageminSvgo()('')).toString(), '');
});
test('support SVGO options', async t => {
- const data = (await m({
+ const data = (await imageminSvgo({
plugins: [{
removeStyleElement: true
}]
@@ -15,10 +16,11 @@ test('support SVGO options', async t => {
t.is(data, '');
});
-test('error on corrupt SVG', async t => {
- await t.throws(m()(''), /Error in parsing SVG/);
+// Failing as SVGO doesn't throw proper errors...
+test.failing('error on corrupt SVG', async t => {
+ await t.throwsAsync(imageminSvgo()(''), {message: /Error in parsing SVG/});
});
test('ignore non valid SVG', async t => {
- t.is(await m()(''), '');
+ t.is(await imageminSvgo()(''), '');
});