-
Notifications
You must be signed in to change notification settings - Fork 63
/
pretty_print_test.coffee
40 lines (27 loc) · 1.03 KB
/
pretty_print_test.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require './setup'
describe 'Pretty Print', ->
describe 'default', ->
beforeEach ->
@load "### Hello\n\n @example\n div", head: ''
it 'should work', ->
it 'indent <head>', ->
expect(@html).match /\n <head/
it 'indent <body>', ->
expect(@html).match /\n <body/
it 'indent .sg-section-hello', ->
expect(@html).match /\n {6}<section class="sg-block sg-section-hello/
it 'indent .sg-canvas', ->
expect(@html).match /\n {10}<div class="sg-canvas/
describe 'custom indentSize', ->
beforeEach ->
@load "### Hello\n\n @example\n div", indentSize: 4, head: ''
it 'should work', ->
it 'indent <head>', ->
expect(@html).match /\n {4}<head/
it 'indent <body>', ->
expect(@html).match /\n {4}<body/
it 'indent .sg-section-hello', ->
expect(@html).match /\n {12}<section class="sg-block sg-section-hello/
it 'indent .sg-canvas', ->
expect(@html).match /\n {20}<div class="sg-canvas/
xdescribe 'custom indentSize, no head', ->