Skip to content

Commit

Permalink
debug failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
leoortizz committed Apr 29, 2024
1 parent e6a2557 commit e57c355
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/webframeworks-deploy-tests/tests.ts
Expand Up @@ -2,7 +2,6 @@ import { expect, use } from "chai";
import * as glob from "glob";
import { join, normalize, relative } from "path";
import { readFileSync } from "fs";
import fetch from "node-fetch";
import type { NextConfig } from "next";
import * as deepEqualUnordered from "deep-equal-in-any-order";
use(deepEqualUnordered);
Expand Down Expand Up @@ -239,10 +238,18 @@ describe("webframeworks", function (this) {
).toString(),
);
const apiStaticResponse = await fetch(`${NEXTJS_HOST}/app/api/static`);

const jsonResponse = await apiStaticResponse.json();

Check warning on line 242 in scripts/webframeworks-deploy-tests/tests.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
console.log({
apiStaticJSON,
jsonResponse,
headers: apiStaticResponse.headers.entries(),
});

expect(apiStaticResponse.ok).to.be.true;
expect(apiStaticResponse.headers.get("content-type")).to.eql("application/json");
expect(apiStaticResponse.headers.get("custom-header")).to.eql("custom-value");
expect(await apiStaticResponse.json()).to.eql(apiStaticJSON);
expect(jsonResponse).to.eql(apiStaticJSON);
});

it("should have working SSG", async () => {
Expand Down

0 comments on commit e57c355

Please sign in to comment.