Skip to content

Commit 5932d36

Browse files
committed
Remove unnecessary tests
The regex `/calc\(.*?\)/` safely covers any argument to `calc()`.
1 parent c62577b commit 5932d36

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

specs/bug81aSpec.js

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
11
var test = require('./test');
22

33
describe('bug 8.1.a', function() {
4-
describe('expands shorthand', function() {
5-
it('with px', function(done) {
6-
var input = 'a{flex: 1 0 calc(1px);}';
7-
var output = 'a{flex-grow: 1;flex-shrink: 0;flex-basis: calc(1px);}';
8-
test(input, output, {}, done);
9-
});
10-
it('with px-px', function(done) {
11-
var input = 'a{flex: 0 1 calc(1px - 1px);}';
12-
var output = 'a{flex-grow: 0;flex-shrink: 1;flex-basis: calc(1px - 1px);}';
13-
test(input, output, {}, done);
14-
});
15-
it('with vw', function(done) {
16-
var input = 'a{flex: 1 0 calc(1vw);}';
17-
var output = 'a{flex-grow: 1;flex-shrink: 0;flex-basis: calc(1vw);}';
18-
test(input, output, {}, done);
19-
});
20-
it('with vw-vw', function(done) {
21-
var input = 'a{flex: 0 1 calc(1vw-1vw);}';
22-
var output = 'a{flex-grow: 0;flex-shrink: 1;flex-basis: calc(1vw-1vw);}';
23-
test(input, output, {}, done);
24-
});
25-
it('with vw-px', function(done) {
26-
var input = 'a{flex: 1 0 calc(1vw-1px);}';
27-
var output = 'a{flex-grow: 1;flex-shrink: 0;flex-basis: calc(1vw-1px);}';
28-
test(input, output, {}, done);
29-
});
30-
it('with %', function(done) {
31-
var input = 'a{flex: 0 1 calc(1vw);}';
32-
var output = 'a{flex-grow: 0;flex-shrink: 1;flex-basis: calc(1vw);}';
33-
test(input, output, {}, done);
34-
});
4+
it('Expands the shorthand when calc() is used', function(done) {
5+
var input = 'a{flex: 1 0 calc(1vw - 1px);}';
6+
var output = 'a{flex-grow: 1;flex-shrink: 0;flex-basis: calc(1vw - 1px);}';
7+
test(input, output, {}, done);
358
});
369
describe('does nothing', function() {
3710
it('when using only first value', function(done) {

0 commit comments

Comments
 (0)