Files
smartstring/test/test.normalize.both.ts

21 lines
474 B
TypeScript
Raw Normal View History

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