Stripe Connect module API explorer

/api/user/connect/country-specs-count (GET)

Account information like email addresses is generated with faker-js it is not real user information.

await global.api.user.connect.CountrySpecsCount.get(req)

NodeJS source (view on github)

const connect = require('../../../../../index.js')

module.exports = {
  get: async (req) => {
    return connect.Storage.CountrySpec.count()
  }
}

Test source (view on github)

/* eslint-env mocha */
const assert = require('assert')
const TestHelper = require('../../../../../test-helper.js')

describe('/api/user/connect/country-specs-count', function () {
  before(TestHelper.disableMetrics)
  after(TestHelper.enableMetrics)
  describe('returns', () => {
    it('integer', async () => {
      const user = await TestHelper.createUser()
      const req = TestHelper.createRequest('/api/user/connect/country-specs-count')
      req.account = user.account
      req.session = user.session
      req.filename = __filename
      req.saveResponse = true
      const total = await req.get()
      assert.strictEqual(total > 0, true)
    })
  })
})