@microsoft.azure/autorest.testserver
Version:
Autorest test server.
18 lines (14 loc) • 464 B
text/typescript
import { cleanupBody } from "./body-utils";
describe("BodyUtils", () => {
describe("cleanupBody()", () => {
it("remove trailing whitespaces", () => {
expect(cleanupBody(" foo ")).toEqual("foo");
});
it("remove trailing new lines", () => {
expect(cleanupBody("\nfoo\nbar\n")).toEqual("foo\nbar");
});
it("replace windows line endings", () => {
expect(cleanupBody("foo\r\nbar")).toEqual("foo\nbar");
});
});
});