|
@@ -2,12 +2,12 @@ import kbn from '../utils/kbn';
|
|
|
|
|
|
|
|
describe('stringToJsRegex', () => {
|
|
describe('stringToJsRegex', () => {
|
|
|
it('should parse the valid regex value', () => {
|
|
it('should parse the valid regex value', () => {
|
|
|
- const output = kbn.stringToJsRegex("/validRegexp/");
|
|
|
|
|
|
|
+ const output = kbn.stringToJsRegex('/validRegexp/');
|
|
|
expect(output).toBeInstanceOf(RegExp);
|
|
expect(output).toBeInstanceOf(RegExp);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should throw error on invalid regex value', () => {
|
|
it('should throw error on invalid regex value', () => {
|
|
|
- const input = "/etc/hostname";
|
|
|
|
|
|
|
+ const input = '/etc/hostname';
|
|
|
expect(() => {
|
|
expect(() => {
|
|
|
kbn.stringToJsRegex(input);
|
|
kbn.stringToJsRegex(input);
|
|
|
}).toThrow();
|
|
}).toThrow();
|