@@ -8,17 +8,16 @@ import { sortBy } from 'lodash/fp';
8
8
9
9
import { formatIndexFields , formatFirstFields , formatSecondFields , createFieldItem } from './index' ;
10
10
import { mockAuditbeatIndexField , mockFilebeatIndexField , mockPacketbeatIndexField } from './mock' ;
11
+ import { fieldsBeat as beatFields } from '../../utils/beat_schema/fields' ;
11
12
12
13
describe ( 'Index Fields' , ( ) => {
13
14
describe ( 'formatIndexFields' , ( ) => {
14
15
test ( 'Basic functionality' , async ( ) => {
15
- const { fieldsBeat } = await import ( '../../utils/beat_schema/fields' ) ;
16
-
17
16
expect (
18
17
sortBy (
19
18
'name' ,
20
19
await formatIndexFields (
21
- fieldsBeat ,
20
+ beatFields ,
22
21
[ mockAuditbeatIndexField , mockFilebeatIndexField , mockPacketbeatIndexField ] ,
23
22
[ 'auditbeat' , 'filebeat' , 'packetbeat' ]
24
23
)
@@ -169,10 +168,8 @@ describe('Index Fields', () => {
169
168
170
169
describe ( 'formatFirstFields' , ( ) => {
171
170
test ( 'Basic functionality' , async ( ) => {
172
- const { fieldsBeat } = await import ( '../../utils/beat_schema/fields' ) ;
173
-
174
171
const fields = await formatFirstFields (
175
- fieldsBeat ,
172
+ beatFields ,
176
173
[ mockAuditbeatIndexField , mockFilebeatIndexField , mockPacketbeatIndexField ] ,
177
174
[ 'auditbeat' , 'filebeat' , 'packetbeat' ]
178
175
) ;
@@ -753,11 +750,9 @@ describe('Index Fields', () => {
753
750
} ) ;
754
751
755
752
describe ( 'createFieldItem' , ( ) => {
756
- test ( 'Basic functionality' , async ( ) => {
757
- const { fieldsBeat } = await import ( '../../utils/beat_schema/fields' ) ;
758
-
759
- const item = await createFieldItem (
760
- fieldsBeat ,
753
+ test ( 'Basic functionality' , ( ) => {
754
+ const item = createFieldItem (
755
+ beatFields ,
761
756
[ 'auditbeat' ] ,
762
757
{
763
758
name : '_id' ,
0 commit comments