INNER CODE UNIT · JavaScript

suite

getndazn/dazn-lambda-powertools · packages/lambda-powertools-correlation-ids/__tests__/index.js:8

const suite = (correlationIds) => () => {
  afterEach(correlationIds.clearAll)
  describe('.set', () => {
    describe('when the key is missing x-correlation- prefix', () => {
      beforeEach(() => {
        correlationIds.set('id', 'test')
      })
      it('adds the prefix', () => {
        expect(correlationIds.get()).toEqual({
          'x-correlation-id': 'test'
        })
      })
    })

    describe('when the key has x-correlation-prefix', () => {
      beforeEach(() => {
        correlationIds.set('x-correlation-id', 'test')
      })

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…