-
Notifications
You must be signed in to change notification settings - Fork 352
fix:solution 2 #322
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?
fix:solution 2 #322
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 |
|---|---|---|
| @@ -1,10 +1,48 @@ | ||
| 'use strict'; | ||
|
|
||
| const { ExportConflictException } = require('@aws-sdk/client-dynamodb'); | ||
|
|
||
| describe('restoreNames', () => { | ||
| // const { restoreNames } = require('./restoreNames'); | ||
| const { restoreNames } = require('./restoreNames'); | ||
|
|
||
| it('should set the firstName from fullName when firstName is set as undefined ', () => { | ||
| const users = [ | ||
| { | ||
| firstName: undefined, | ||
| lastName: 'Holy', | ||
| fullName: 'Jack Holy', | ||
| }, | ||
| ] | ||
|
|
||
| restoreNames(users); | ||
|
|
||
| expect(users[0].firstName).toBe('Jack') | ||
| }); | ||
|
|
||
| it('should set the firstName from fullName when firstName is not set as property ', () => { | ||
| const users = [ | ||
| { | ||
| lastName: 'Holy', | ||
| fullName: 'Jack Holy', | ||
| }, | ||
| ] | ||
|
|
||
| restoreNames(users); | ||
|
|
||
| expect(users[0].firstName).toBe('Jack') | ||
| }); | ||
|
|
||
| it('should ', () => { | ||
| it('should keep the firstName when firstName has a different value than fullName', () => { | ||
| const users = [ | ||
| { firstName: 'Jack', | ||
| lastName: 'Holy', | ||
| fullName: 'John Holy', | ||
| }, | ||
| ] | ||
|
|
||
| restoreNames(users); | ||
|
|
||
| expect(users[0].firstName).toBe('Jack') | ||
| }); | ||
|
|
||
| // write tests here | ||
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import seems to be unused in this test file. It's good practice to remove any unnecessary dependencies or leftover code.