Skip to content

Commit

Permalink
Adds more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peterramsing committed Dec 6, 2016
1 parent 360e5a3 commit 37ec111
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/lost-column.js
Expand Up @@ -167,15 +167,24 @@ describe('lost-column', function() {
});

describe('supports LTR', () => {
it('works', () => {
it('works with typical column', () => {
check(
`@lost direction rtl;\n`+
`a { lost-column: 1/2; }\n`,
`a { width: calc(99.9% * 1/2 - (30px - 30px * 1/2)); }\n` +
`a:nth-child(1n) { float: right; margin-left: 30px; clear: none; }\n` +
`a:last-child { margin-left: 0; }\n` +
`a:nth-child(2n) { margin-left: 0; float: left; }\n` +
`a:nth-child(2n + 1) { clear: both; }`
`a:nth-child(2n + 1) { clear: both; }\n` // why it needs a new line?
);
check(
`@lost direction rtl;\n`+
`a { lost-column: 5/10; }\n`,
`a { width: calc(99.9% * 5/10 - (30px - 30px * 5/10)); }\n` +
`a:nth-child(1n) { float: right; margin-left: 30px; clear: none; }\n` +
`a:last-child { margin-left: 0; }\n` +
`a:nth-child(10n) { margin-left: 0; float: left; }\n` +
`a:nth-child(10n + 1) { clear: both; }\n` // why it needs a new line?
);
});
});
Expand Down

0 comments on commit 37ec111

Please sign in to comment.