mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-03-13 06:52:18 +08:00
19 lines
521 B
TypeScript
19 lines
521 B
TypeScript
import {prefixObjectKeys} from '../utilities/workflowAnnotationUtils'
|
|
|
|
describe('WorkflowAnnotationUtils', () => {
|
|
describe('prefixObjectKeys', () => {
|
|
it('should prefix an object with a given prefix', () => {
|
|
const obj = {
|
|
foo: 'bar',
|
|
baz: 'qux'
|
|
}
|
|
const prefix = 'prefix.'
|
|
const expected = {
|
|
'prefix.foo': 'bar',
|
|
'prefix.baz': 'qux'
|
|
}
|
|
expect(prefixObjectKeys(obj, prefix)).toEqual(expected)
|
|
})
|
|
})
|
|
})
|