vitest-plugin-vis 1.6.4 → 1.6.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"create_vis.d.ts","sourceRoot":"","sources":["../../src/setup/create_vis.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAEjF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,oBAAoB;;QAOrD;;WAEG;;QAIH;;;;WAIG;;QAKH;;;;;;;;;;;;;;WAcG;sBACW,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;;;;;;;8BAqBlC,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;;EAwClE"}
1
+ {"version":3,"file":"create_vis.d.ts","sourceRoot":"","sources":["../../src/setup/create_vis.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAEjF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,oBAAoB;;QAOrD;;WAEG;;QAIH;;;;WAIG;;QAKH;;;;;;;;;;;;;;WAcG;sBACW,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;;;;;;;8BAqBlC,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;;EA0ClE"}
@@ -77,7 +77,9 @@ export function createVis(commands) {
77
77
  .expect(getSubject(meta?.subjectDataTestId ?? subjectDataTestId))
78
78
  .toMatchImageSnapshot({
79
79
  ...meta,
80
- customizeSnapshotId: (id) => `${id}-${themeId}`,
80
+ customizeSnapshotId: meta?.customizeSnapshotId
81
+ ? (id, index) => `${meta.customizeSnapshotId(id, index)}-${themeId}`
82
+ : (id) => `${id}-${themeId}`,
81
83
  });
82
84
  }
83
85
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-plugin-vis",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "Vitest visual testing plugin",
5
5
  "keywords": [
6
6
  "image-snapshot",
@@ -79,7 +79,9 @@ export function createVis(commands: SetupVisSuiteCommand) {
79
79
  .expect(getSubject(meta?.subjectDataTestId ?? subjectDataTestId))
80
80
  .toMatchImageSnapshot({
81
81
  ...meta,
82
- customizeSnapshotId: (id) => `${id}-${themeId}`,
82
+ customizeSnapshotId: meta?.customizeSnapshotId
83
+ ? (id, index) => `${meta.customizeSnapshotId!(id, index)}-${themeId}`
84
+ : (id) => `${id}-${themeId}`,
83
85
  })
84
86
  } catch (error) {
85
87
  errors.push([themeId, error])