1
1
import '@testing-library/jest-dom'
2
2
import { render , screen } from '@testing-library/react'
3
3
import userEvent from '@testing-library/user-event'
4
- import exampleData from '../data.json'
5
4
import EmployerDropDown from './EmployerDropDown'
6
-
5
+ const employerList = [
6
+ { name : 'BBC' , _id : 'BBC' } ,
7
+ { name : 'Bet365' , _id : 'Bet365' } ,
8
+ { name : 'Blue Frontier' , _id : 'Blue Frontier' } ,
9
+ { name : 'EngineerBetter' , _id : 'EngineerBetter' } ,
10
+ { name : 'Brandwatch' , _id : 'Brandwatch' } ,
11
+ { name : 'Equal Experts' , _id : 'Equal Experts' } ,
12
+ { name : 'Infobip' , _id : 'Infobip' } ,
13
+ { name : 'Synaptik Digital' , _id : 'Synaptik Digital' } ,
14
+ { name : 'Tata Consultancy services' , _id : 'Tata Consultancy services' } ,
15
+ { name : 'Tamarix Tech' , _id : 'Tamarix Tech' } ,
16
+ { name : 'Inspired Gaming Group' , _id : 'Inspired Gaming Group' } ,
17
+ { name : 'EPAM System' , _id : 'EPAM System' } ,
18
+ { name : 'Blueprint Gaming' , _id : 'Blueprint Gaming' } ,
19
+ { name : 'Beamery' , _id : 'Beamery' } ,
20
+ { name : 'American Express ' , _id : 'American Express ' } ,
21
+ { name : 'Capgemini' , _id : 'Capgemini' } ,
22
+ {
23
+ name : 'Amazon Web Services (AWS)' ,
24
+ _id : 'Amazon Web Services (AWS)'
25
+ } ,
26
+ { name : 'Alpha FX Group' , _id : 'Alpha FX Group' } ,
27
+ { name : 'Amazon' , _id : 'Amazon' } ,
28
+ { name : 'Anaplan' , _id : 'Anaplan' } ,
29
+ { name : 'Alfa Financial Software' , _id : 'Alfa Financial Software' }
30
+ ]
7
31
describe ( 'EmployerDropDown' , ( ) => {
8
32
it ( 'shows a matching option for specific word' , async ( ) => {
9
33
const user = userEvent . setup ( )
10
34
render (
11
35
< EmployerDropDown
12
- arrayList = { exampleData . employerList }
36
+ arrayList = { employerList }
13
37
employerOnChange = { ( ) => { } }
14
38
isEmpty = { false }
15
39
/>
@@ -28,7 +52,7 @@ describe('EmployerDropDown', () => {
28
52
const user = userEvent . setup ( )
29
53
render (
30
54
< EmployerDropDown
31
- arrayList = { exampleData . employerList }
55
+ arrayList = { employerList }
32
56
employerOnChange = { ( ) => { } }
33
57
isEmpty = { false }
34
58
/>
0 commit comments