Files
shields/services/coincap/coincap-priceusd.spec.js
Alexandre Sanlim a2751af0b1 Add [Coincap] Cryptocurrency badges (#8623)
* Add concap services

* Add concap services

* add tests

* Changes after review

* fix import

* fix format

* fix given

* pretty format fix

* changes to code review.

* fix lower label

* fix coincap rank test

* fix labels in static examples

Co-authored-by: chris48s <chris.shaw480@gmail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-11-18 21:18:59 +00:00

17 lines
567 B
JavaScript

import { test, given } from 'sazerac'
import CoincapPriceUsd from './coincap-priceusd.service.js'
describe('PriceUsd Format', function () {
test(CoincapPriceUsd.priceFormat, () => {
given('3').expect('$3.00')
given('33').expect('$33.00')
given('332').expect('$332.00')
given('3324').expect('$3,324.00')
given('332432').expect('$332,432.00')
given('332432.2').expect('$332,432.20')
given('332432.25').expect('$332,432.25')
given('332432432').expect('$332,432,432.00')
given('332432432.3432432').expect('$332,432,432.34')
})
})