-
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 branch 'add-trip-functionality' into rename-add-trip-component
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { getUidFromUserEmail } from './temp-auth-utils'; | ||
import { getUserUidFromUserEmail } from './temp-auth-utils'; | ||
import { getCleanedTextInput, getCollaboratorUidArray } from './filter-input.js'; | ||
|
||
describe('getCleanedTextInput tests', () => { | ||
|
@@ -27,11 +27,11 @@ const mockCurUserEmail = '[email protected]'; | |
// TODO(Issue #55): Replace mock with real auth file once integrated. | ||
jest.mock('./temp-auth-utils.js', () => ({ | ||
getCurUserEmail: () => mockCurUserEmail, | ||
getUidFromUserEmail: (userEmail) => '_' + userEmail + '_', | ||
getUserUidFromUserEmail: (userEmail) => '_' + userEmail + '_', | ||
})); | ||
describe('getCollaboratorUidArray tests', () => { | ||
test('No collaborators entered', () => { | ||
const expectedUidArr = [getUidFromUserEmail(mockCurUserEmail)]; | ||
const expectedUidArr = [getUserUidFromUserEmail(mockCurUserEmail)]; | ||
// This is the list that is created when there are no collaborators added | ||
// (automatically one empty string from the constructor created ref). | ||
const testEmailArr = ['']; | ||
|
@@ -44,8 +44,8 @@ describe('getCollaboratorUidArray tests', () => { | |
test('Some added collaborators', () => { | ||
const person1Email = '[email protected]'; | ||
const person2Email = '[email protected]'; | ||
const expectedUidArr = [getUidFromUserEmail(mockCurUserEmail), | ||
getUidFromUserEmail(person1Email), getUidFromUserEmail(person2Email)]; | ||
const expectedUidArr = [getUserUidFromUserEmail(mockCurUserEmail), | ||
getUserUidFromUserEmail(person1Email), getUserUidFromUserEmail(person2Email)]; | ||
const testEmailArr = [person1Email, person2Email]; | ||
|
||
const testUidArr = getCollaboratorUidArray(testEmailArr); | ||
|
@@ -56,8 +56,8 @@ describe('getCollaboratorUidArray tests', () => { | |
test('Some added collaborators and some blank entries', () => { | ||
const person1Email = '[email protected]'; | ||
const person2Email = '[email protected]'; | ||
const expectedUidArr = [getUidFromUserEmail(mockCurUserEmail), | ||
getUidFromUserEmail(person1Email), getUidFromUserEmail(person2Email)]; | ||
const expectedUidArr = [getUserUidFromUserEmail(mockCurUserEmail), | ||
getUserUidFromUserEmail(person1Email), getUserUidFromUserEmail(person2Email)]; | ||
const testEmailArr = ['', person1Email, '', person2Email, '']; | ||
|
||
const testUidArr = getCollaboratorUidArray(testEmailArr); | ||
|
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