-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update linting of files using eslint
- Loading branch information
Showing
34 changed files
with
1,486 additions
and
1,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# production | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
package.json | ||
package-lock.json | ||
public | ||
.eslintrc.js | ||
__snapshots__ | ||
*.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import addItemApi from "../../API/addItem"; | ||
import addItemApi from '../../API/addItem'; | ||
import axios from '../../axios'; | ||
|
||
describe('addItemApi', () => { | ||
it('should call axios post with correct input', () => { | ||
const mockApiInput = { | ||
itemName: 'test', | ||
itemQuantity: 1, | ||
itemDescription: 'test', | ||
itemZipCode: 'test', | ||
itemCity: 'test', | ||
itemDonorId: 1, | ||
itemCategory: 'test' | ||
}; | ||
const expectedApiInput = { | ||
item_name: 'test', | ||
quantity: 1, | ||
description: 'test', | ||
zipcode: 'test', | ||
city: 'test', | ||
donor_id: 1, | ||
category: 'test' | ||
}; | ||
axios.post = jest.fn(); | ||
addItemApi(mockApiInput); | ||
expect(axios.post).toHaveBeenCalledWith('/additem', expectedApiInput); | ||
jest.clearAllMocks(); | ||
}); | ||
it('should call axios post with correct input', () => { | ||
const mockApiInput = { | ||
itemName: 'test', | ||
itemQuantity: 1, | ||
itemDescription: 'test', | ||
itemZipCode: 'test', | ||
itemCity: 'test', | ||
itemDonorId: 1, | ||
itemCategory: 'test' | ||
}; | ||
const expectedApiInput = { | ||
item_name: 'test', | ||
quantity: 1, | ||
description: 'test', | ||
zipcode: 'test', | ||
city: 'test', | ||
donor_id: 1, | ||
category: 'test' | ||
}; | ||
axios.post = jest.fn(); | ||
addItemApi(mockApiInput); | ||
expect(axios.post).toHaveBeenCalledWith('/additem', expectedApiInput); | ||
jest.clearAllMocks(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/frontend/src/__tests__/components/__snapshots__/donate.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/frontend/src/__tests__/components/__snapshots__/login.spec.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/frontend/src/__tests__/components/__snapshots__/register.spec.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.