Skip to content

Commit cd8455d

Browse files
committed
100% test coverage 🍸
1 parent 896bd6f commit cd8455d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,9 @@ function getDirection(gradient) {
164164
'IE filter doesn\'t support side corner gradient, ' +
165165
'we use the first side of the side corner as fallback.';
166166
}
167-
} else if (gradient.angle.value !== undefined) {
167+
} else {
168168
angle = normalizeAngle(gradient.angle.value, gradient.angle.unit);
169169
result = angleToDirection(angle);
170-
} else {
171-
result.direction = 'bottom';
172170
}
173171

174172
return result;

test/test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ var test = function (inputFile, opts, done, warnings) {
2727
};
2828

2929
describe('postcss-filter-gradient', function () {
30+
it('should not throw errors when `options` is undefined', function (done) {
31+
expect(plugin).to.not.throw();
32+
done();
33+
});
34+
3035
it('should do nothing if linear-gradient not exists', function (done) {
3136
test('none', {}, done);
3237
});

0 commit comments

Comments
 (0)