From 89e95b3f143682ed9a006991bacf45c9dcba4818 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:43:05 +0800 Subject: remove node_modules --- node_modules/renderkid/test/RenderKid.coffee | 273 --------------------------- 1 file changed, 273 deletions(-) delete mode 100644 node_modules/renderkid/test/RenderKid.coffee (limited to 'node_modules/renderkid/test/RenderKid.coffee') diff --git a/node_modules/renderkid/test/RenderKid.coffee b/node_modules/renderkid/test/RenderKid.coffee deleted file mode 100644 index 3ca4852f..00000000 --- a/node_modules/renderkid/test/RenderKid.coffee +++ /dev/null @@ -1,273 +0,0 @@ -RenderKid = require '../src/RenderKid' -{strip} = require '../src/AnsiPainter' - -match = (input, expected, setStuff) -> - r = new RenderKid - r.style - span: - display: 'inline' - div: - display: 'block' - - setStuff?(r) - strip(r.render(input)).trim().should.equal expected.trim() - -describe "RenderKid", -> - describe "constructor()", -> - it "should work", -> - new RenderKid - - describe "whitespace management - inline", -> - it "shouldn't put extra whitespaces", -> - input = """ - - abc - - """ - - expected = """ - - abc - - """ - - match input, expected - - it "should allow 1 whitespace character on each side", -> - input = """ - - a b c - - """ - - expected = """ - - a b c - - """ - - match input, expected - - it "should eliminate extra whitespaces inside text", -> - input = """ - - ab1 \n b2c - - """ - - expected = """ - - ab1 b2c - - """ - - match input, expected - - it "should allow line breaks with
", -> - input = """ - - ab1
b2
c - - """ - - expected = """ - - ab1\nb2c - - """ - - match input, expected - - it "should allow line breaks with &nl;", -> - input = """ - - ab1&nl;b2c - - """ - - expected = """ - - ab1\nb2c - - """ - - match input, expected - - it "should allow whitespaces with &sp;", -> - input = """ - - ab1&sp;b2c - - """ - - expected = """ - - ab1 b2c - - """ - - match input, expected - - describe "whitespace management - block", -> - it "should add one linebreak between two blocks", -> - input = """ - -
a
-
b
- - """ - - expected = """ - - a - b - - """ - - match input, expected - - it "should ignore empty blocks", -> - input = """ - -
a
-
-
b
- - """ - - expected = """ - - a - b - - """ - - match input, expected - - it "should add an extra linebreak between two adjacent blocks inside an inline", -> - input = """ - - -
a
-
b
-
- - """ - - expected = """ - - a - - b - - """ - - match input, expected - - it "example: div(marginBottom:1)+div", -> - input = """ - -
a
-
b
- - """ - - expected = """ - - a - - b - - """ - - match input, expected, (r) -> - r.style '.first': marginBottom: 1 - - it "example: div+div(marginTop:1)", -> - input = """ - -
a
-
b
- - """ - - expected = """ - - a - - b - - """ - - match input, expected, (r) -> - r.style '.second': marginTop: 1 - - it "example: div(marginBottom:1)+div(marginTop:1)", -> - input = """ - -
a
-
b
- - """ - - expected = """ - - a - - - b - - """ - - match input, expected, (r) -> - r.style - '.first': marginBottom: 1 - '.second': marginTop: 1 - - it "example: div(marginBottom:2)+div(marginTop:1)", -> - input = """ - -
a
-
b
- - """ - - expected = """ - - a - - - - b - - """ - - match input, expected, (r) -> - r.style - '.first': marginBottom: 2 - '.second': marginTop: 1 - - it "example: div(marginBottom:2)+span+div(marginTop:1)", -> - input = """ - -
a
- span -
b
- - """ - - expected = """ - - a - - - span - - b - - """ - - match input, expected, (r) -> - r.style - '.first': marginBottom: 2 - '.second': marginTop: 1 \ No newline at end of file -- cgit v1.2.3