@cuppet/core 1.2.3 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuppet/core",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Core testing framework components for Cuppet - BDD framework based on Cucumber and Puppeteer",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "author": "Miroslav Rusev",
26
26
  "license": "ISC",
27
27
  "peerDependencies": {
28
- "@cucumber/cucumber": "^12.0.0",
28
+ "@cucumber/cucumber": "^12.2.0",
29
29
  "config": "^4.1.0"
30
30
  },
31
31
  "dependencies": {
@@ -49,7 +49,7 @@
49
49
  "xml2js": "^0.6.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@cucumber/cucumber": "^12.0.0",
52
+ "@cucumber/cucumber": "^12.2.0",
53
53
  "@html-eslint/eslint-plugin": "^0.43.1",
54
54
  "@html-eslint/parser": "^0.43.0",
55
55
  "@semantic-release/changelog": "^6.0.3",
@@ -22,8 +22,11 @@ module.exports = {
22
22
  prepareUrl: async function (url) {
23
23
  const path = await storage.checkForMultipleVariables(url);
24
24
  if (!path.startsWith('http') && config.has('api.baseApiUrl')) {
25
- return config.get('api.baseApiUrl') + path;
25
+ // Replace placeholders in base path with variables
26
+ const resolveBasePath = await storage.checkForMultipleVariables(config.get('api.baseApiUrl'));
27
+ return resolveBasePath + path;
26
28
  }
29
+ // Return the path as is if it's already an absolute URL or if no base path is configured
27
30
  return path;
28
31
  },
29
32
 
@@ -31,9 +31,8 @@ module.exports = {
31
31
  */
32
32
  clearJsonFile: function () {
33
33
  if (jsonFilePath) {
34
- fs.truncate(jsonFilePath, 0, () => {
35
- console.log('JSON File Cleared successfully!');
36
- });
34
+ fs.truncateSync(jsonFilePath, 0);
35
+ console.log('JSON File Cleared successfully!');
37
36
  }
38
37
  },
39
38