Skip to content

Commit ea23fac

Browse files
committed
fix tests
1 parent 542e141 commit ea23fac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pages/api/[network]/get-names.test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ describe("get-names API E2E", () => {
12231223
* - Invalid parameters
12241224
* - Proper error messages
12251225
*/
1226-
test("returns 400 with invalid API key", async () => {
1226+
test("returns 401 with invalid API key", async () => {
12271227
const req = createRequest({
12281228
method: "GET",
12291229
query: {
@@ -1236,7 +1236,7 @@ describe("get-names API E2E", () => {
12361236

12371237
await handler(req, response);
12381238

1239-
expect(response._getStatusCode()).toBe(400);
1239+
expect(response._getStatusCode()).toBe(401);
12401240
expect(JSON.parse(response._getData())).toEqual({
12411241
error: "Domain does not exist"
12421242
});
@@ -1249,13 +1249,12 @@ describe("get-names API E2E", () => {
12491249
network: networkConfig.path,
12501250
domain: "nonexistent.eth"
12511251
},
1252-
headers: { authorization: networkConfig.apiKey }
12531252
});
12541253
const response = createResponse();
12551254

12561255
await handler(req, response);
12571256

1258-
expect(response._getStatusCode()).toBe(400);
1257+
expect(response._getStatusCode()).toBe(400;
12591258
expect(JSON.parse(response._getData())).toEqual({
12601259
error: "Domain does not exist"
12611260
});

0 commit comments

Comments
 (0)