jest-image-snapshot 6.5.0 → 6.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [6.5.1](https://github.com/americanexpress/jest-image-snapshot/compare/v6.5.0...v6.5.1) (2025-05-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * work with base64 strings ([#368](https://github.com/americanexpress/jest-image-snapshot/issues/368)) ([9a3ca4f](https://github.com/americanexpress/jest-image-snapshot/commit/9a3ca4f173669250a49b9a5709f8ba933b55fc78))
7
+
1
8
  # [6.5.0](https://github.com/americanexpress/jest-image-snapshot/compare/v6.4.0...v6.5.0) (2025-05-12)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-image-snapshot",
3
- "version": "6.5.0",
3
+ "version": "6.5.1",
4
4
  "description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.",
5
5
  "main": "src/index.js",
6
6
  "engines": {
package/src/index.js CHANGED
@@ -28,6 +28,9 @@ function toBuffer(data) {
28
28
  if (data == null || Buffer.isBuffer(data)) {
29
29
  return data;
30
30
  }
31
+ if (typeof data === 'string') {
32
+ return Buffer.from(data, 'base64');
33
+ }
31
34
 
32
35
  return Buffer.from(data);
33
36
  }