feat(esmole): es_request, es_search, es_list_indices, es_get_mapping, es_cluster_health
This commit is contained in:
1 parent
889e844768
commit
49fb98c18b
12 files changed
+568
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { esFormatError } from '../../../src/esError.js'
|
||||
|
||||
describe('esFormatError', () => {
|
||||
it('prefixes an Error message', () => {
|
||||
expect(esFormatError({}, new Error('boom'))).toBe('[elasticsearch] boom')
|
||||
})
|
||||
it('stringifies a non-Error value', () => {
|
||||
expect(esFormatError(undefined, 'plain')).toBe('[elasticsearch] plain')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user