Skip to content
Snippets Groups Projects
Select Git revision
  • a5480d5a8c535e12ae63cc992ac48666d96e0d35
  • master default protected
  • gh-pages
  • dependabot/npm_and_yarn/eslint-plugin-jsdoc-51.0.3
  • dependabot/npm_and_yarn/nock-14.0.5
  • dependabot/npm_and_yarn/react-19.1.0
  • dependabot/npm_and_yarn/react-dom-19.1.0
  • server-2025-02-01-6100669a
  • server-2024-11-01-87cba042
  • server-2024-10-01-6875b7c8
  • dependabot/npm_and_yarn/path-to-regexp-8.2.0
  • server-2024-09-01-3d52575c
  • daily-tests-gha2
  • daily-tests-gha
  • server-2023-12-01-92d8fb8e
  • server-2023-11-01-a80c93fd
  • server-2023-10-01-31096085
  • coc-v2
  • server-2023-09-01-8edc3810
  • server-2023-08-01-75858a03
  • server-2023-07-01-02183d8d
  • server-2025-07-01
  • 5.0.2
  • 5.0.1
  • 5.0.0
  • server-2025-06-01
  • server-2025-05-01
  • server-2025-04-03
  • server-2025-03-02
  • server-2025-03-01
  • server-2025-02-02
  • server-2025-01-01
  • server-2024-12-01
  • server-2024-11-02
  • 4.1.0
  • server-2024-09-25
  • server-2024-09-02
  • server-2024-08-01
  • server-2024-07-01
  • 4.0.0
  • server-2024-06-01
41 results

load-simple-icons.spec.js

Blame
  • load-simple-icons.spec.js 1.42 KiB
    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')
      })
    })