-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from TaskRatchet/Working
Home Screen, List, Styling, Organization, Tests, and API updates.
- Loading branch information
Showing
66 changed files
with
13,513 additions
and
3,580 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
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,5 @@ | ||
jest.mock('@react-native-async-storage/async-storage', () => ({ | ||
getItem: jest.fn(() => Promise.resolve('token')), | ||
setItem: jest.fn(() => Promise.resolve()), | ||
removeItem: jest.fn(), | ||
})); |
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,27 @@ | ||
import 'react-native'; | ||
import getStoredUser from '../src/utils/getStoredUser'; | ||
|
||
// Note: import explicitly to use the types shiped with jest. | ||
import {it, expect} from '@jest/globals'; | ||
import {get} from 'http'; | ||
|
||
// Mock AsyncStorage | ||
jest.mock('@react-native-async-storage/async-storage', () => ({ | ||
getItem: jest.fn(() => Promise.resolve(JSON.stringify('me'))), | ||
})); | ||
|
||
// Import the mocked AsyncStorage | ||
const AsyncStorage = jest.requireMock( | ||
'@react-native-async-storage/async-storage', | ||
); | ||
|
||
describe('getStoredUser', () => { | ||
it('Calls AsyncStorage.getItem', async () => { | ||
await getStoredUser(); | ||
|
||
expect(AsyncStorage.getItem).toBeCalledWith('me'); | ||
}); | ||
it('Gets User From AsyncStorage', async () => { | ||
await expect(getStoredUser()).resolves.toBe('me'); | ||
}); | ||
}); |
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,8 @@ | ||
describe('loginScreen', () => { | ||
it('test runs', async () => { | ||
expect(true).toBeTruthy(); | ||
// Arrange | ||
// Act | ||
// Assert | ||
}); | ||
}); |
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,14 @@ | ||
import {render} from '@testing-library/react-native'; | ||
import React from 'react'; | ||
import App from '../src/App'; | ||
|
||
describe('TaskPopup', () => { | ||
it('does not render at login', () => { | ||
const {queryByTestId} = render(<App />); | ||
|
||
// Assuming TaskPopup has a testID prop set to 'taskPopup' | ||
const taskPopup = queryByTestId('taskPopup'); | ||
|
||
expect(taskPopup).toBeNull(); | ||
}); | ||
}); |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.