mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Port the unit tests from https://github.com/vercel/nft/tree/941be1cb3b9d38fbc99a8a6f07af568a64ed0f12/test/unit
14 lines
353 B
JavaScript
14 lines
353 B
JavaScript
const sharp = require('sharp033')
|
|
const path = require('path')
|
|
|
|
const roundedCorners = Buffer.from(
|
|
'<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
|
|
)
|
|
|
|
sharp(roundedCorners).resize(200, 200).png().toBuffer()
|
|
|
|
sharp(path.resolve(__dirname, 'fixtures/vercel.svg'))
|
|
.resize({ width: 100, height: 100 })
|
|
.jpeg()
|
|
.toBuffer()
|