-
Notifications
You must be signed in to change notification settings - Fork 241
solution #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
solution #178
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ const { Server, Agent } = require('http'); | |
| // this prevents `socket hang up` for Node.js 20.10+ | ||
| axios.defaults.httpAgent = new Agent({ keepAlive: false }); | ||
|
|
||
| const PORT = 5701; | ||
| const PORT = 5703; | ||
| const HOST = `http://localhost:${PORT}`; | ||
|
|
||
| describe('Form Data Server', () => { | ||
|
|
@@ -47,7 +47,7 @@ describe('Form Data Server', () => { | |
| title: 'Test Expense', | ||
| amount: '100', | ||
| }; | ||
| const response = await axios.post(`${HOST}/add-expense`, expense); | ||
| const response = await axios.post(`${HOST}/submit-expense`, expense); | ||
|
|
||
| expect(response.status).toBe(200); | ||
|
|
||
|
|
@@ -67,7 +67,7 @@ describe('Form Data Server', () => { | |
| expect.assertions(2); | ||
|
|
||
| try { | ||
| await axios.post(`${HOST}/add-expense`, expense); | ||
| await axios.post(`${HOST}/submit-expense`, expense); | ||
| } catch (err) { | ||
| expect(err.response.data.length).toBeGreaterThan(0); | ||
|
|
||
|
|
@@ -81,7 +81,7 @@ describe('Form Data Server', () => { | |
| title: 'Test Expense', | ||
| amount: '100', | ||
| }; | ||
| const response = await axios.post(`${HOST}/add-expense`, expense); | ||
| const response = await axios.post(`${HOST}/submit-expense`, expense); | ||
|
|
||
| expect(response.headers['content-type']).toBe('application/json'); | ||
|
snezhana-recruit marked this conversation as resolved.
Outdated
|
||
| expect(response.data).toStrictEqual(expense); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assertion is now inconsistent with the |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.