'use strict'
import { EventCategory, EventComponent } from '../../src/dto/shared.dto'

import { expect } from 'chai'
import { metrics } from '../../src/metrics'

describe('CommonNetworkMember', () => {
  const params = {
    link:        'some_hsash_from_did',
    name:        'Did Created',
    category:    EventCategory.DID,
    subCategory: 'registry',
    component:   EventComponent.AffinityWalletExpoSDK
  }

  it('#send', async() => {
    const response = await metrics.send(params, 'test-api-key')

    expect(response).to.exist
    expect(response.link).to.be.not.equal(params.link)
    expect(response.name).to.be.equal(params.name)
    expect(response.category).to.be.equal(params.category)
    expect(response.subCategory).to.be.equal(params.subCategory)
    expect(response.component).to.be.equal(params.component)
  })
})
