mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Make optimize synchronous (#1322)
Ref https://github.com/svg/svgo/issues/1015 Looks like `sax` is synchronous and we do not need to listen "end" event. This allows to avoid all callbacks and make `optimize` method synchronous.
This commit is contained in:
@ -44,10 +44,9 @@ describe('plugins tests', function() {
|
||||
js2svg : { pretty: true }
|
||||
});
|
||||
|
||||
return svgo.optimize(orig, {path: file}).then(function(result) {
|
||||
//FIXME: results.data has a '\n' at the end while it should not
|
||||
normalize(result.data).should.be.equal(should);
|
||||
});
|
||||
const result = svgo.optimize(orig, {path: file});
|
||||
//FIXME: results.data has a '\n' at the end while it should not
|
||||
normalize(result.data).should.be.equal(should);
|
||||
});
|
||||
|
||||
});
|
||||
@ -69,4 +68,4 @@ function readFile(file) {
|
||||
resolve(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user