smartstring/test/test.normalize.both.ts

19 lines
425 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
tap.test('should normalize a string', async () => {
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);
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();