@cuppet/core 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/postinstall.js +9 -0
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@cuppet/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Core testing framework components for Cuppet - BDD framework based on Cucumber and Puppeteer",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "src/",
8
8
  "features/",
9
9
  "index.js",
10
- "stepDefinitions.js"
10
+ "stepDefinitions.js",
11
+ "postinstall.js"
11
12
  ],
12
13
  "keywords": [
13
14
  "testing",
package/postinstall.js ADDED
@@ -0,0 +1,9 @@
1
+ const fs = require('fs');
2
+
3
+ const isRoot = process.cwd() === process.env.INIT_CWD;
4
+ if (isRoot) {
5
+ fs.mkdirSync('jsonFiles', { recursive: true });
6
+ fs.mkdirSync('reports', { recursive: true });
7
+ fs.mkdirSync('screenshots', { recursive: true });
8
+ console.log('Created jsonFiles, reports, and screenshots folders.');
9
+ }