Files
shields/lib/all-badge-examples.spec.js
T
Paul MelnikowandGitHub f2efd751b5 Minor refactor of examples preparation (#1632)
This cleans up the work from #1582, clarifying concerns, removing a bit of duplication, and renaming for clarity.
2018-04-02 07:03:52 -05:00

30 lines
845 B
JavaScript

'use strict';
const { expect } = require('chai');
const allBadgeExamples = require('./all-badge-examples');
describe('The badge examples', function () {
it('should include AppVeyor, which is added automatically', function () {
const { examples } = allBadgeExamples.findCategory('build');
const appVeyorBuildExamples = examples.filter(ex => ex.title.includes('AppVeyor'))
.filter(ex => ! ex.title.includes('tests'));
expect(appVeyorBuildExamples).to.deep.equal([
{
title: 'AppVeyor',
previewUri: '/appveyor/ci/gruntjs/grunt.svg',
exampleUri: undefined,
documentation: undefined,
},
{
title: 'AppVeyor branch',
previewUri: '/appveyor/ci/gruntjs/grunt/master.svg',
exampleUri: undefined,
documentation: undefined,
},
]);
});
});