smartstring/test/test.indent.both.ts

29 lines
592 B
TypeScript
Raw Normal View History

2022-03-18 21:50:24 +00:00
import * as smartstring from '../ts/index.js';
2023-08-18 11:12:25 +00:00
import { tap, expect } from '@push.rocks/tapbundle';
2017-10-05 13:55:59 +00:00
// indent
let testString = `
base
expect be indented
some more
base
indented
`;
2017-10-05 13:55:59 +00:00
// normalize
tap.test('expect normalize a string', async () => {
testString = smartstring.indent.normalize(testString);
console.log(testString);
let zoneNameArg = 'test1';
let destinationIpArg = '111';
});
2017-10-05 13:55:59 +00:00
// indent with prefix
tap.test('expect indent', async () => {
testString = smartstring.indent.indentWithPrefix(testString, '>> ');
console.log(testString);
});
2017-10-05 13:55:59 +00:00
tap.start();