Files
shields/lib/svg-badge-parser.spec.js
Paul Melnikow 7a664ca3e8 Run prettier (#1866)
Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
2018-08-08 17:57:14 -04:00

20 lines
592 B
JavaScript

'use strict'
const { expect } = require('chai')
const { makeBadgeData } = require('./badge-data')
const { valueFromSvgBadge } = require('./svg-badge-parser')
const testHelpers = require('./make-badge-test-helpers')
const makeBadge = testHelpers.makeBadge()
describe('The SVG badge parser', function() {
it('should find the correct value', function() {
const badgeData = makeBadgeData('this is the label', {})
badgeData.text[1] = 'this is the result!'
const exampleSvg = makeBadge(badgeData)
expect(valueFromSvgBadge(exampleSvg)).to.equal('this is the result!')
})
})