import { test } from '@japa/runner'
import * as helpers from '../../../../src/modeling/helpers/endpointHelpers.js'

test.group('endpointHelpers', () => {
  test('paramNameFor extracts last key', ({ assert }) => {
    assert.equal(helpers.paramNameFor('product'), 'productId')
    assert.equal(helpers.paramNameFor('domain:product'), 'productId')
    assert.equal(helpers.paramNameFor('a:b:c'), 'cId')
  })
})
