comparadise-utils 0.0.3 → 0.0.4

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.
@@ -42,7 +42,7 @@ function matchScreenshot(subject, args) {
42
42
  if (typeof hasBase !== 'boolean')
43
43
  throw new Error('Result of baseExists task was not a boolean.');
44
44
  const target = subject ? cy.wrap(subject) : cy;
45
- target.screenshot(`${screenshotPath}/new`, { ...options, overwrite: true });
45
+ target.screenshot(`${testPathWithoutFileName}/${rawName}/new`, { ...options, overwrite: true });
46
46
  if (!hasBase) {
47
47
  cy.task('log', `❌ A new base image was created at ${screenshotPath}. Add this as a new base image via Comparadise!`);
48
48
  return;
@@ -25,12 +25,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.compareScreenshots = exports.baseExists = void 0;
27
27
  const fs = __importStar(require("fs"));
28
- const path_1 = __importStar(require("path"));
28
+ const path_1 = require("path");
29
29
  const pngjs_1 = require("pngjs");
30
30
  const images_1 = require("./images");
31
31
  function baseExists(screenshotFolder) {
32
32
  const fileName = (0, path_1.join)(screenshotFolder, 'base.png');
33
- const exists = fs.existsSync(path_1.default.resolve(fileName));
33
+ const exists = fs.existsSync(fileName);
34
34
  if (!exists) {
35
35
  console.log('Base image does not exist. This means a new one will be created. If your base should exist, something went wrong.');
36
36
  }
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  "build": "tsc",
30
30
  "postbuild": "echo \"require('./dist/match-screenshot');\" > commands.js"
31
31
  },
32
- "version": "0.0.3"
32
+ "version": "0.0.4"
33
33
  }