1a12fb870b
- New /developers/ page with API docs, SDKs, pricing, use cases - OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics - Case study: Glasskiosken i Flatenbadet — complete ROI analysis - Updated /order/ with recurring missions and frequency dropdown
17 lines
597 B
JavaScript
17 lines
597 B
JavaScript
'use strict'
|
|
|
|
const tap = require('tap')
|
|
const joinLinesWithIndentation = require('./join-lines-with-indentation')
|
|
|
|
tap.test('joinLinesWithIndentation adds indentation to beginning of subsequent lines', async t => {
|
|
const input = 'foo\nbar\nbaz'
|
|
const result = joinLinesWithIndentation({ input })
|
|
t.equal(result, 'foo\n bar\n baz')
|
|
})
|
|
|
|
tap.test('joinLinesWithIndentation accepts custom indentation, line breaks, and eol', async t => {
|
|
const input = 'foo\nbar\r\nbaz'
|
|
const result = joinLinesWithIndentation({ input, ident: ' ', eol: '^' })
|
|
t.equal(result, 'foo^ bar^ baz')
|
|
})
|