forked from elastic/kibana
-
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.
[Observability onboarding] Applying regex globally (elastic#177719)
Closes elastic#177704. Co-authored-by: Marco Antonio Ghiani <[email protected]>
- Loading branch information
1 parent
111a627
commit d744b69
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
..._solution/observability_onboarding/public/components/app/custom_logs/get_filename.test.ts
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { getFilename } from './get_filename'; | ||
|
||
describe('Observability onboarding - get_filename', () => { | ||
it.each([ | ||
['test', '/logs-onboarding/test.log'], | ||
['test', '/logs-onboarding/test.log'], | ||
['test', 'test.log'], | ||
['test', '/logs-onboarding/long-path/test.log'], | ||
['test', '/logs-onboarding/test.20240223.log'], | ||
['test', 'test'], | ||
['', ''], | ||
['test', '\\logs-onboarding\\test.log'], | ||
['test', "/logs-on'boarding/test.log"], | ||
['te_st', "/logs-on'boarding/te'st.log"], | ||
['test_123', '/logs-onboarding/test 123.log'], | ||
['t_e_s_t_1_2_3_', '/logs-onboarding/t-e%s*t#1@2!3$.log'], | ||
])( | ||
'should return "%s" for filename "%s"', | ||
(expectedFilename: string, filePath: string) => { | ||
expect(getFilename(filePath)).toBe(expectedFilename); | ||
} | ||
); | ||
}); |
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