Skip to content

Commit

Permalink
Reduce number of handleConversion test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed May 12, 2017
1 parent 200f465 commit 2a8d8e1
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions test/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ describe('rsvg-brunch', function () {
output: [
{width: 32},
{width: 64},
{width: 128},
{width: 256},
{width: 384},
{width: 512}
{width: 128}
]
};
});
Expand All @@ -215,7 +212,7 @@ describe('rsvg-brunch', function () {
const conversionPromise = plugin.handleConversion(conversion);
conversionPromise.then(() => {
sinon.assert.calledOnce(loggySpy.info);
sinon.assert.calledWith(loggySpy.info, sinon.match(/6 of 6/gi));
sinon.assert.calledWith(loggySpy.info, sinon.match(/3 of 3/gi));
done();
}).catch(done);
});
Expand All @@ -226,13 +223,11 @@ describe('rsvg-brunch', function () {
const plugin = new ProxiedPlugin(defaultConfig);
// Ensure that default extendOutputProps does not prepend /public
// plugin.extendOutputProps;
conversion.output[2].height = 0;
conversion.output[4].height = 0;
conversion.output[1].height = 0;
const conversionPromise = plugin.handleConversion(conversion);
conversionPromise.then(() => {
sinon.assert.calledTwice(loggySpy.error);
sinon.assert.calledWith(loggySpy.error, sinon.match(/128/gi));
sinon.assert.calledWith(loggySpy.error, sinon.match(/384/gi));
sinon.assert.calledOnce(loggySpy.error);
sinon.assert.calledWith(loggySpy.error, sinon.match(/64/gi));
done();
}).catch(done);
});
Expand Down

0 comments on commit 2a8d8e1

Please sign in to comment.