From 37ec111f934b5c425340ae293cef329dd77b7ee0 Mon Sep 17 00:00:00 2001 From: Peter Ramsing Date: Tue, 6 Dec 2016 12:57:45 -0800 Subject: [PATCH] Adds more tests --- test/lost-column.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/lost-column.js b/test/lost-column.js index b1e492dc..6e0587f0 100644 --- a/test/lost-column.js +++ b/test/lost-column.js @@ -167,7 +167,7 @@ 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`, @@ -175,7 +175,16 @@ describe('lost-column', function() { `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? ); }); });