This continues a consistency update we’ve been making to standardize on URL based on a recommendation from WHATWG: https://url.spec.whatwg.org/#goals This also helps with copying and pasting between all-badge-examples and new-style services, where it’s otherwise easy to make a mistake. Ref: #1322 #1341
33 lines
1011 B
JavaScript
33 lines
1011 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',
|
|
exampleUrl: '/appveyor/ci/gruntjs/grunt.svg',
|
|
previewUrl: '/badge/build-passing-brightgreen.svg',
|
|
urlPattern: '/appveyor/ci/:user/:repo.svg',
|
|
documentation: undefined,
|
|
},
|
|
{
|
|
title: 'AppVeyor branch',
|
|
exampleUrl: '/appveyor/ci/gruntjs/grunt/master.svg',
|
|
previewUrl: '/badge/build-passing-brightgreen.svg',
|
|
urlPattern: '/appveyor/ci/:user/:repo/:branch.svg',
|
|
documentation: undefined,
|
|
},
|
|
])
|
|
})
|
|
})
|