Skip to content

Commit

Permalink
👕 Rocket ship
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Ramsing committed Oct 31, 2020
1 parent 21f684b commit c37fa9a
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 177 deletions.
78 changes: 39 additions & 39 deletions test/lost-align.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
var check = require('./check');
var throws = require('./throws');

describe('lost-align', function() {
it('resets the alignment', function() {
describe('lost-align', () => {
it('resets the alignment', () => {
check(
'a { lost-align: reset; }',
'a { position: static; }\n' +
Expand All @@ -13,7 +13,7 @@ describe('lost-align', function() {
);
});

it('aligns horizontally', function() {
it('aligns horizontally', () => {
check(
'a { lost-align: horizontal; }',
'a { position: relative; }\n' +
Expand All @@ -22,7 +22,7 @@ describe('lost-align', function() {
);
});

it('aligns vertically', function() {
it('aligns vertically', () => {
check(
'a { lost-align: vertical; }',
'a { position: relative; }\n' +
Expand All @@ -31,7 +31,7 @@ describe('lost-align', function() {
);
});

it('aligns top left', function() {
it('aligns top left', () => {
check(
'a { lost-align: top-left; }',
'a { position: relative; }\n' +
Expand All @@ -40,7 +40,7 @@ describe('lost-align', function() {
);
});

it('aligns top center', function() {
it('aligns top center', () => {
check(
'a { lost-align: top-center; }',
'a { position: relative; }\n' +
Expand All @@ -49,7 +49,7 @@ describe('lost-align', function() {
);
});

it('aligns top', function() {
it('aligns top', () => {
check(
'a { lost-align: top; }',
'a { position: relative; }\n' +
Expand All @@ -58,7 +58,7 @@ describe('lost-align', function() {
);
});

it('aligns top right', function() {
it('aligns top right', () => {
check(
'a { lost-align: top-right; }',
'a { position: relative; }\n' +
Expand All @@ -67,7 +67,7 @@ describe('lost-align', function() {
);
});

it('aligns middle left', function() {
it('aligns middle left', () => {
check(
'a { lost-align: middle-left; }',
'a { position: relative; }\n' +
Expand All @@ -76,7 +76,7 @@ describe('lost-align', function() {
);
});

it('aligns left', function() {
it('aligns left', () => {
check(
'a { lost-align: left; }',
'a { position: relative; }\n' +
Expand All @@ -85,7 +85,7 @@ describe('lost-align', function() {
);
});

it('aligns middle center', function() {
it('aligns middle center', () => {
check(
'a { lost-align: middle-center; }',
'a { position: relative; }\n' +
Expand All @@ -94,7 +94,7 @@ describe('lost-align', function() {
);
});

it('aligns center', function() {
it('aligns center', () => {
check(
'a { lost-align: center; }',
'a { position: relative; }\n' +
Expand All @@ -103,7 +103,7 @@ describe('lost-align', function() {
);
});

it('aligns middle right', function() {
it('aligns middle right', () => {
check(
'a { lost-align: middle-right; }',
'a { position: relative; }\n' +
Expand All @@ -112,7 +112,7 @@ describe('lost-align', function() {
);
});

it('aligns right', function() {
it('aligns right', () => {
check(
'a { lost-align: right; }',
'a { position: relative; }\n' +
Expand All @@ -121,7 +121,7 @@ describe('lost-align', function() {
);
});

it('aligns bottom left', function() {
it('aligns bottom left', () => {
check(
'a { lost-align: bottom-left; }',
'a { position: relative; }\n' +
Expand All @@ -130,7 +130,7 @@ describe('lost-align', function() {
);
});

it('aligns bottom center', function() {
it('aligns bottom center', () => {
check(
'a { lost-align: bottom-center; }',
'a { position: relative; }\n' +
Expand All @@ -139,7 +139,7 @@ describe('lost-align', function() {
);
});

it('aligns bottom', function() {
it('aligns bottom', () => {
check(
'a { lost-align: bottom; }',
'a { position: relative; }\n' +
Expand All @@ -148,7 +148,7 @@ describe('lost-align', function() {
);
});

it('aligns bottom right', function() {
it('aligns bottom right', () => {
check(
'a { lost-align: bottom-right; }',
'a { position: relative; }\n' +
Expand All @@ -157,158 +157,158 @@ describe('lost-align', function() {
);
});

it('throws error if it does not understand the direction', function() {
it('throws error if it does not understand the direction', () => {
throws(
'a { lost-align: bottom-rigth; }',
"lost-align: direction 'bottom-rigth' is unknown."
);
});

describe('flexbox', function() {
it('resets the alignment', function() {
describe('flexbox', () => {
it('resets the alignment', () => {
check(
'a { lost-align: reset flex; }',
'a { display: initial; }\n' +
'a { justify-content: inherit; align-items: inherit; }'
);
});

it('aligns horizontally', function() {
it('aligns horizontally', () => {
check(
'a { lost-align: horizontal flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: inherit; }'
);
});

it('aligns vertically', function() {
it('aligns vertically', () => {
check(
'a { lost-align: vertical flex; }',
'a { display: flex; }\n' +
'a { justify-content: inherit; align-items: center; }'
);
});

it('aligns top left', function() {
it('aligns top left', () => {
check(
'a { lost-align: top-left flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-start; align-items: flex-start; }'
);
});

it('aligns top center', function() {
it('aligns top center', () => {
check(
'a { lost-align: top-center flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: flex-start; }'
);
});

it('aligns top', function() {
it('aligns top', () => {
check(
'a { lost-align: top flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: flex-start; }'
);
});

it('aligns top right', function() {
it('aligns top right', () => {
check(
'a { lost-align: top-right flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-end; align-items: flex-start; }'
);
});

it('aligns middle left', function() {
it('aligns middle left', () => {
check(
'a { lost-align: middle-left flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-start; align-items: center; }'
);
});

it('aligns left', function() {
it('aligns left', () => {
check(
'a { lost-align: left flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-start; align-items: center; }'
);
});

it('aligns middle center', function() {
it('aligns middle center', () => {
check(
'a { lost-align: middle-center flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: center; }'
);
});

it('aligns center', function() {
it('aligns center', () => {
check(
'a { lost-align: center flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: center; }'
);
});

it('aligns middle right', function() {
it('aligns middle right', () => {
check(
'a { lost-align: middle-right flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-end; align-items: center; }'
);
});

it('aligns right', function() {
it('aligns right', () => {
check(
'a { lost-align: right flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-end; align-items: center; }'
);
});

it('aligns bottom left', function() {
it('aligns bottom left', () => {
check(
'a { lost-align: bottom-left flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-start; align-items: flex-end; }'
);
});

it('aligns bottom center', function() {
it('aligns bottom center', () => {
check(
'a { lost-align: bottom-center flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: flex-end; }'
);
});

it('aligns bottom', function() {
it('aligns bottom', () => {
check(
'a { lost-align: bottom flex; }',
'a { display: flex; }\n' +
'a { justify-content: center; align-items: flex-end; }'
);
});

it('aligns bottom right', function() {
it('aligns bottom right', () => {
check(
'a { lost-align: bottom-right flex; }',
'a { display: flex; }\n' +
'a { justify-content: flex-end; align-items: flex-end; }'
);
});

it('throws error if it does not understand the direction', function() {
it('throws error if it does not understand the direction', () => {
throws(
'a { lost-align: bottom-rigth flex; }',
"lost-align: direction 'bottom-rigth' is unknown."
);
});

it('Flexbox is set globally', function() {
it('Flexbox is set globally', () => {
check(
'@lost flexbox flex; \n' + 'a { lost-align: bottom-right; }',
'a { display: flex; }\n' +
Expand Down
14 changes: 7 additions & 7 deletions test/lost-at-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

var check = require('./check');

describe('lost-at-rule', function() {
it('changes the default gutter', function() {
describe('lost-at-rule', () => {
it('changes the default gutter', () => {
check(
'@lost gutter 60px;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand All @@ -28,7 +28,7 @@ describe('lost-at-rule', function() {
);
});

it('changes the flexbox default', function() {
it('changes the flexbox default', () => {
check(
'@lost flexbox flex;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand All @@ -53,7 +53,7 @@ describe('lost-at-rule', function() {
);
});

it('changes the cycle to none', function() {
it('changes the cycle to none', () => {
check(
'@lost cycle none;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand All @@ -74,7 +74,7 @@ describe('lost-at-rule', function() {
);
});

it('changes the cycle to auto', function() {
it('changes the cycle to auto', () => {
check(
'@lost cycle auto;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand All @@ -99,7 +99,7 @@ describe('lost-at-rule', function() {
);
});

it('changes the cycle to number', function() {
it('changes the cycle to number', () => {
check(
'@lost cycle 2;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand All @@ -124,7 +124,7 @@ describe('lost-at-rule', function() {
);
});

it('can adapt the global rounder', function() {
it('can adapt the global rounder', () => {
check(
'@lost rounder 100;\n' + 'div {\n' + ' lost-column: 1/3;\n' + '}',

Expand Down
Loading

0 comments on commit c37fa9a

Please sign in to comment.