Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Mar 19, 2022
1 parent 817462d commit 1d2bfe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/spriteBackgroundImages.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,9 @@ module.exports = () =>
isNaN(existingOffsets[1])
) {
const err = new Error(
`WARNING: trying to sprite ${imageInfo.asset.url} with background-position: ${existingBackgroundPositionDecls[0].value}`
`WARNING: trying to sprite ${
imageInfo.asset.url
} with ${existingBackgroundPositionDecls[0].toString()}`
);
assetGraph.warn(err);
} else {
Expand Down
2 changes: 1 addition & 1 deletion test/spriteBackgroundImages.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ describe('spriteBackgroundImages', () => {

expect(warnSpy, 'to have calls satisfying', () => {
warnSpy(
/WARNING: trying to sprite file:.*\/foo.png\?sprite=icons with background-position: {2}$/
/WARNING: trying to sprite file:.*\/foo.png\?sprite=icons with background-position: !important$/
);
});
});
Expand Down

0 comments on commit 1d2bfe5

Please sign in to comment.