* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * reformat all the things (prettier 3) * update tests to await calls to prettier.format() --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chris48s <git@chris-shaw.dev>
41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
import { expect } from 'chai'
|
|
import loadSimpleIcons from './load-simple-icons.js'
|
|
|
|
describe('loadSimpleIcons', function () {
|
|
let simpleIcons
|
|
before(function () {
|
|
simpleIcons = loadSimpleIcons()
|
|
})
|
|
|
|
it('prepares three color themes', function () {
|
|
expect(simpleIcons.sentry.base64).to.have.all.keys(
|
|
'default',
|
|
'light',
|
|
'dark',
|
|
)
|
|
})
|
|
|
|
it('normalizes icon keys', function () {
|
|
// As of v5 of simple-icons the slug and exported key is `linuxfoundation`
|
|
// with a name of `Linux Foundation`, so ensure we support both as well
|
|
// as the legacy mapping of `linux-foundation` for backwards compatibility.
|
|
expect(simpleIcons).to.include.key('linuxfoundation')
|
|
expect(simpleIcons).to.include.key('linux foundation')
|
|
expect(simpleIcons).to.include.key('linux-foundation')
|
|
})
|
|
|
|
// https://github.com/badges/shields/issues/4016
|
|
it('excludes "get" function provided by the simple-icons', function () {
|
|
expect(simpleIcons).to.not.have.property('get')
|
|
})
|
|
|
|
it('maps overlapping icon titles correctly', function () {
|
|
// Both of these icons have the same title: 'Hive', so make sure
|
|
// the proper slugs are still mapped to the correct logo
|
|
expect(simpleIcons.hive.slug).to.equal('hive')
|
|
expect(simpleIcons.hive.title).to.equal('Hive')
|
|
expect(simpleIcons.hive_blockchain.slug).to.equal('hive_blockchain')
|
|
expect(simpleIcons.hive_blockchain.title).to.equal('Hive')
|
|
})
|
|
})
|