smartstring/test/test.normalize.both.ts

21 lines
469 B
TypeScript
Raw Normal View History

2023-08-18 11:12:25 +00:00
import { tap, expect } from '@push.rocks/tapbundle';
2019-01-12 19:12:58 +00:00
2022-03-18 21:50:24 +00:00
import * as smartstring from '../ts/index.js';
2019-01-12 19:12:58 +00:00
2024-03-01 22:34:43 +00:00
tap.test('should normalize a string', async (toolsArg) => {
2019-01-12 19:12:58 +00:00
const testString = `
myawesome string;
is indented with two spaces
2019-04-16 06:55:37 +00:00
`;
2019-01-12 19:12:58 +00:00
const normalizedString = smartstring.normalize.standard(testString);
2024-03-01 22:34:43 +00:00
console.log(normalizedString);
2022-03-18 21:50:24 +00:00
expect(normalizedString).toEqual(
2023-08-31 14:31:23 +00:00
`myawesome string;
2019-01-12 19:12:58 +00:00
is indented with two spaces
`
2019-04-16 06:55:37 +00:00
);
});
2019-01-12 19:12:58 +00:00
2019-04-16 06:55:37 +00:00
tap.start();