Skip to content

Commit

Permalink
test(mocha): add test coverage for new outputStylesheetPath option (#204
Browse files Browse the repository at this point in the history
)
  • Loading branch information
patrickcate authored Jul 18, 2020
1 parent 676e8ff commit 7e9d881
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/plugin-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@ describe('Default options', function() {
expect(opts.imagePath).to.equal(process.cwd());
expect(opts.spritePath).to.equal(process.cwd());
expect(opts.stylesheetPath).to.equal('path/to/css/file');
expect(opts.outputStylesheetPath).to.equal(undefined);
expect(opts.padding).to.equal(20);
expect(opts.algorithm).to.equal('binary-tree');

done();
});

it('should assign custom outputStylesheetPath path if defined by the user', function(done) {
const opts = pluginOptions.init(
{ outputStylesheetPath: '/my/custom/path' },
'path/to/css/file/image.png'
);

expect(opts.outputStylesheetPath).to.equal('/my/custom/path');

done();
});
});

0 comments on commit 7e9d881

Please sign in to comment.