|
1 | 1 | const interleave = require('../src/utils/tagged-template-literal').interleave
|
2 |
| -const isLastLineWhitespaceOnly = require('../src/utils/general').isLastLineWhitespaceOnly |
3 |
| -const isEmptyOrSpaceOnly = require('../src/utils/general').isEmptyOrSpaceOnly |
4 | 2 |
|
5 | 3 | describe('utils', () => {
|
6 | 4 | describe('interleave', () => {
|
@@ -157,48 +155,8 @@ describe('utils', () => {
|
157 | 155 | }
|
158 | 156 | ]
|
159 | 157 | expect(interleave(quasis2, expressions2)).toEqual(
|
160 |
| - '\n display: $dummyValue; -styled-mixin0: dummyValue\n' |
| 158 | + '\n display: $dummyValue; -styled-mixin0: dummyValue;\n' |
161 | 159 | )
|
162 | 160 | })
|
163 | 161 | })
|
164 |
| - |
165 |
| - describe('isLastLineWhitespaceOnly', () => { |
166 |
| - it('should return true for empty string', () => { |
167 |
| - expect(isLastLineWhitespaceOnly('')).toEqual(true) |
168 |
| - }) |
169 |
| - |
170 |
| - it('should return true for string of spaces', () => { |
171 |
| - expect(isLastLineWhitespaceOnly(' ')).toEqual(true) |
172 |
| - }) |
173 |
| - |
174 |
| - it('should return true for string of spaces and tabs', () => { |
175 |
| - expect(isLastLineWhitespaceOnly(' \t ')).toEqual(true) |
176 |
| - }) |
177 |
| - |
178 |
| - it('should return false for string with something other than space and tab', () => { |
179 |
| - expect(isLastLineWhitespaceOnly('not space')).toEqual(false) |
180 |
| - }) |
181 |
| - |
182 |
| - it('should return true if last line has only space and tab', () => { |
183 |
| - expect(isLastLineWhitespaceOnly('not space\n ')).toEqual(true) |
184 |
| - }) |
185 |
| - }) |
186 |
| - |
187 |
| - describe('isEmptyOrSpaceOnly', () => { |
188 |
| - it('should return true for empty string', () => { |
189 |
| - expect(isEmptyOrSpaceOnly('')).toEqual(true) |
190 |
| - }) |
191 |
| - |
192 |
| - it('should return true for consecutive empty string', () => { |
193 |
| - expect(isEmptyOrSpaceOnly(' ')).toEqual(true) |
194 |
| - }) |
195 |
| - |
196 |
| - it('should return true for string of spaces and tabs', () => { |
197 |
| - expect(isEmptyOrSpaceOnly(' \t ')).toEqual(true) |
198 |
| - }) |
199 |
| - |
200 |
| - it('should return false for string of newline', () => { |
201 |
| - expect(isEmptyOrSpaceOnly('\n')).toEqual(false) |
202 |
| - }) |
203 |
| - }) |
204 | 162 | })
|
0 commit comments