Skip to content

Commit

Permalink
text fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Mar 1, 2021
1 parent 3a0c400 commit f72b23f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('#formatTimelineData', () => {
});
});

it('rule signal results', () => {
it('rule signal results', async () => {
const response: EventHit = {
_index: '.siem-signals-patrykkopycinski-default-000007',
_id: 'a77040f198355793c35bf22b900902371309be615381f0a2ec92c208b6132562',
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('#formatTimelineData', () => {
};

expect(
formatTimelineData(
await formatTimelineData(
['@timestamp', 'host.name', 'destination.ip', 'source.ip'],
TIMELINE_EVENTS_FIELDS,
response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const mergeTimelineFieldsWithHit = async <T>(
) => {
if (fieldName != null || dataFields.includes(fieldName)) {
const fieldNameAsArray = fieldName.split('.');
const nestedParentFieldName = Object.keys(hit.fields).find((f) => {
const nestedParentFieldName = Object.keys(hit.fields ?? []).find((f) => {
return f === fieldNameAsArray.slice(0, f.split('.').length).join('.');
});
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ const EXPECTED_DATA = [
{
category: 'source',
field: 'source.geo.location',
values: ['{"long":-122.3341,"lat":47.6103}'],
originalValue: ['{"coordinates":[-122.3341,47.6103],"type":"Point"}'],
values: ['{"lon":-122.3341,"lat":47.6103}'],
originalValue: ['{"lon":-122.3341,"lat":47.6103}'],
isObjectArray: true,
},
{
Expand Down Expand Up @@ -611,8 +611,8 @@ const EXPECTED_DATA = [
{
category: 'traefik',
field: 'traefik.access.geoip.location',
values: ['{"long":-122.3341,"lat":47.6103}'],
originalValue: ['{"coordinates":[-122.3341,47.6103],"type":"Point"}'],
values: ['{"lon":-122.3341,"lat":47.6103}'],
originalValue: ['{"lon":-122.3341,"lat":47.6103}'],
isObjectArray: true,
},
{
Expand Down

0 comments on commit f72b23f

Please sign in to comment.