Skip to content

Commit

Permalink
fix(platform-test-utils): replace \n with EOL in response matching
Browse files Browse the repository at this point in the history
Fix PlatformExpress - View - Scenario1: GET /rest/views/scenario-1 -
should render a view from #953
  • Loading branch information
rluvaton authored and Romakita committed Oct 4, 2020
1 parent 6c02fe3 commit 85d5278
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/platform-test-utils/src/tests/testView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {Locals} from "@tsed/common/src/mvc/decorators/params/locals";
import {expect} from "chai";
import * as SuperTest from "supertest";
import {PlatformTestOptions} from "../interfaces";
import {EOL} from "os";

@Middleware()
class LocalsMiddleware {
Expand Down Expand Up @@ -51,7 +52,7 @@ export function testView(options: PlatformTestOptions) {
it("should render a view", async () => {
const response = await request.get("/rest/views/scenario-1").expect(200);

expect(response.text).to.deep.equal("<p>Hello world with opts and ID local-10909</p>\n");
expect(response.text).to.deep.equal(`<p>Hello world with opts and ID local-10909</p>${EOL}`);
});
});

Expand Down

0 comments on commit 85d5278

Please sign in to comment.