smartstring/test/test.normalize.ts

20 lines
423 B
TypeScript
Raw Normal View History

2019-01-12 19:12:58 +00:00
import { tap, expect } from '@pushrocks/tapbundle';
import * as smartstring from '../ts/index';
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);
expect(normalizedString).to.equal(
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();