smartstring/test/test.normalize.both.ts

20 lines
425 B
TypeScript
Raw Permalink Normal View History

2019-01-12 19:12:58 +00:00
import { tap, expect } from '@pushrocks/tapbundle';
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(
2019-04-16 06:55:37 +00:00
`
2019-01-12 19:12:58 +00:00
myawesome string;
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();