@zohodesk/testinglibrary 0.0.6 → 0.0.7-exp.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
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Framework that abstracts the configuration for playwright and Jest
4
4
 
5
+ # 0.0.7-exp.1
6
+
7
+ - Tags Support
8
+ - Enable running without bddmode feature
9
+ - viewport configuration
10
+ - Code refactoring
11
+
12
+ # 0.0.7
13
+
14
+ - Removed react and react-dom as dependencies. Added this as peer dependency
15
+
5
16
  # 0.0.6
6
17
 
7
18
  ## Provided Initial Support for cucumber feature files
@@ -51,7 +51,7 @@ var _readConfigFile = require("./readConfigFile");
51
51
  // }
52
52
  // }
53
53
  const {
54
- additionalPages = {},
54
+ additionalPages,
55
55
  bddMode
56
56
  } = (0, _readConfigFile.generateConfigFromFile)();
57
57
  let base = bddMode ? _bddFramework.test : _test.test;
@@ -12,6 +12,38 @@ var _fs = require("fs");
12
12
  var _path = _interopRequireDefault(require("path"));
13
13
  var _logger = require("../../utils/logger");
14
14
  const fileName = 'uat.config.js';
15
+ exports.fileName = fileName;
16
+ function getDefaultConfig() {
17
+ return {
18
+ browsers: ['Chrome'],
19
+ trace: false,
20
+ video: false,
21
+ isAuthMode: false,
22
+ openReportOn: 'never',
23
+ reportPath: _path.default.join(process.cwd(), 'uat', 'playwright-report'),
24
+ bddMode: false,
25
+ expectTimeout: 5 * 1000,
26
+ testTimeout: 60 * 1000,
27
+ authFilePath: 'uat/playwright/.auth/user.json',
28
+ viewport: null,
29
+ debug: false,
30
+ mode: 'dev',
31
+ additionalPages: {}
32
+ };
33
+ }
34
+ function combineDefaultConfigWithUserConfig(userConfiguration) {
35
+ let defaultConfig = getDefaultConfig();
36
+ return {
37
+ ...defaultConfig,
38
+ ...userConfiguration
39
+ };
40
+ }
41
+
42
+ /**
43
+ * @typedef {Object|null} viewportConfig
44
+ * @property {number} width - width of the viewport
45
+ * @property {number} height - height of the viewport
46
+ */
15
47
 
16
48
  /**
17
49
  * Represents the user configuration object.
@@ -32,6 +64,7 @@ const fileName = 'uat.config.js';
32
64
  * @property {Object} additionalPages: custom pages configuration
33
65
  * @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
34
66
  * @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
67
+ * @property {viewportConfig} viewport: viewport configuration
35
68
  */
36
69
 
37
70
  /**
@@ -39,13 +72,13 @@ const fileName = 'uat.config.js';
39
72
  *
40
73
  * @returns {UserConfig}
41
74
  */
42
- exports.fileName = fileName;
43
75
  function generateConfigFromFile() {
44
76
  const filePath = _path.default.resolve(process.cwd(), fileName);
45
77
  if ((0, _fs.existsSync)(filePath)) {
46
78
  /** @type {UserConfig} */
47
79
  const config = require(filePath);
48
- return config;
80
+ const modifiedConfiguration = combineDefaultConfigWithUserConfig(config);
81
+ return modifiedConfiguration;
49
82
  }
50
83
  return {};
51
84
  }
@@ -14,7 +14,7 @@ const userArgs = process.argv.slice(3);
14
14
  const playwrightPath = _path.default.resolve((0, _rootPath.getExecutableBinaryPath)('playwright'));
15
15
  const command = playwrightPath;
16
16
  const {
17
- reportPath: htmlPath = _path.default.resolve(process.cwd(), 'uat', './playwright-report')
17
+ reportPath: htmlPath
18
18
  } = (0, _readConfigFile.generateConfigFromFile)();
19
19
  const args = ['show-report', htmlPath].concat(userArgs);
20
20
  function generateReport() {
@@ -7,111 +7,62 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _test = require("@playwright/test");
9
9
  var _path = _interopRequireDefault(require("path"));
10
- var _bddFramework = require("../../../bdd-framework");
11
10
  var _readConfigFile = require("../readConfigFile");
12
- // @ts-check
13
-
14
- // import { cpus } from 'os';
15
- // const numOfCpus = cpus().length;
16
- const defaultBrowser = ['Chrome'];
11
+ var _configUtils = require("./config-utils");
17
12
  const {
18
- browsers = defaultBrowser,
19
- trace = false,
20
- video = false,
13
+ browsers,
14
+ trace,
15
+ video,
21
16
  isAuthMode,
22
17
  openReportOn,
23
- reportPath = _path.default.join(process.cwd(), 'uat', 'playwright-report'),
24
- bddMode = false,
25
- expectTimeout = 5 * 1000,
26
- testTimeout = 60 * 1000,
27
- authFilePath = 'uat/playwright/.auth/user.json'
18
+ reportPath,
19
+ bddMode,
20
+ expectTimeout,
21
+ testTimeout,
22
+ authFilePath,
23
+ viewport
28
24
  } = (0, _readConfigFile.generateConfigFromFile)();
29
- let projects = browsers.map(browserName => {
30
- let browser = browserName.toLowerCase();
31
- if (browser === 'chrome') {
32
- return {
33
- name: 'chromium',
34
- use: {
35
- ..._test.devices['Desktop Chrome'],
36
- storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
37
- },
38
- dependencies: isAuthMode ? ['setup'] : []
39
- };
40
- } else if (browser === 'edge') {
41
- return {
42
- name: 'Microsoft Edge',
43
- use: {
44
- ..._test.devices['Desktop Chrome'],
45
- channel: 'msedge',
46
- storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
47
- },
48
- dependencies: isAuthMode ? ['setup'] : []
49
- };
50
- } else if (browser === 'firefox') {
51
- return {
52
- name: 'firefox',
53
- timeout: 4 * 60 * 1000,
54
- expect: {
55
- timeout: 80 * 1000
56
- },
57
- use: {
58
- ..._test.devices['Desktop Firefox'],
59
- storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
60
- },
61
- dependencies: isAuthMode ? ['setup'] : []
62
- };
63
- } else if (browser === 'safari') {
64
- return {
65
- name: 'webkit',
66
- timeout: 2 * 60 * 1000,
67
- expect: {
68
- timeout: 80 * 1000
69
- },
70
- use: {
71
- ..._test.devices['Desktop Safari'],
72
- storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
73
- },
74
- dependencies: isAuthMode ? ['setup'] : null
75
- };
76
- }
77
- }).filter(Boolean);
78
- const testPath = _path.default.join(_path.default.resolve(process.cwd()), 'uat');
79
- const testDir = bddMode ? (0, _bddFramework.defineBddConfig)({
80
- paths: [`${testPath}/**/*.feature`],
81
- import: [`${testPath}/**/steps/*.spec.js`],
82
- featuresRoot: `${testPath}`,
83
- outputDir: `${testPath}/.features-gen`,
84
- publish: true
85
- }) : _path.default.join(_path.default.resolve(process.cwd()), 'uat');
86
- var _default = (0, _test.defineConfig)({
87
- testDir,
88
- outputDir: _path.default.join(process.cwd(), 'uat', 'test-results'),
89
- fullyParallel: true,
90
- forbidOnly: !!process.env.CI,
91
- retries: process.env.CI ? 2 : 0,
92
- workers: process.env.CI ? 1 : 1,
93
- reporter: [['html', {
94
- outputFolder: reportPath,
95
- open: openReportOn
96
- }]],
97
- timeout: testTimeout,
98
- expect: {
99
- timeout: expectTimeout
100
- },
101
- use: {
102
- trace: trace ? 'on' : 'off',
103
- video: video ? {
104
- mode: 'on',
105
- size: {
106
- width: 640,
107
- height: 480
108
- }
109
- } : 'off'
110
- },
111
- projects: isAuthMode ? [{
112
- name: 'setup',
113
- testMatch: /.*\.setup\.js/,
114
- testDir: _path.default.join(_path.default.resolve(process.cwd()), 'uat')
115
- }, ...projects] : [...projects]
25
+ const projects = (0, _configUtils.getProjects)({
26
+ browsers,
27
+ isAuthMode,
28
+ authFilePath,
29
+ expectTimeout,
30
+ testTimeout
116
31
  });
32
+ const testDir = (0, _configUtils.getTestDir)(bddMode, process.cwd());
33
+ function getPlaywrightConfig() {
34
+ return {
35
+ testDir,
36
+ outputDir: _path.default.join(process.cwd(), 'uat', 'test-results'),
37
+ fullyParallel: true,
38
+ forbidOnly: !!process.env.CI,
39
+ retries: process.env.CI ? 2 : 0,
40
+ workers: process.env.CI ? 1 : 1,
41
+ reporter: [['html', {
42
+ outputFolder: reportPath,
43
+ open: openReportOn
44
+ }]],
45
+ timeout: testTimeout,
46
+ expect: {
47
+ timeout: expectTimeout
48
+ },
49
+ use: {
50
+ viewport,
51
+ trace: trace ? 'on' : 'off',
52
+ video: video ? {
53
+ mode: 'on',
54
+ size: {
55
+ width: 640,
56
+ height: 480
57
+ }
58
+ } : 'off'
59
+ },
60
+ projects: isAuthMode ? [{
61
+ name: 'setup',
62
+ testMatch: /.*\.setup\.js/,
63
+ testDir: _path.default.join(process.cwd(), 'uat')
64
+ }, ...projects] : [...projects]
65
+ };
66
+ }
67
+ var _default = (0, _test.defineConfig)(getPlaywrightConfig());
117
68
  exports.default = _default;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getProjects = getProjects;
8
+ exports.getTestDir = getTestDir;
9
+ var _test = require("@playwright/test");
10
+ var _path = _interopRequireDefault(require("path"));
11
+ var _readConfigFile = require("../readConfigFile");
12
+ var _bddFramework = require("../../../bdd-framework");
13
+ function getBrowserConfig({
14
+ browserName,
15
+ isAuthMode,
16
+ authFilePath,
17
+ expectTimeout,
18
+ testTimeout
19
+ }) {
20
+ const browser = browserName.toLowerCase();
21
+ const commonConfig = {
22
+ storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
23
+ };
24
+ const dependencies = isAuthMode ? ['setup'] : [];
25
+ if (browser === 'chrome') {
26
+ return {
27
+ name: 'chromium',
28
+ use: {
29
+ ..._test.devices['Desktop Chrome'],
30
+ ...commonConfig
31
+ },
32
+ dependencies,
33
+ timeout: testTimeout,
34
+ expect: {
35
+ timeout: expectTimeout
36
+ }
37
+ };
38
+ } else if (browser === 'edge') {
39
+ return {
40
+ name: 'Microsoft Edge',
41
+ timeout: testTimeout,
42
+ expect: {
43
+ timeout: expectTimeout
44
+ },
45
+ use: {
46
+ ..._test.devices['Desktop Chrome'],
47
+ channel: 'msedge',
48
+ ...commonConfig
49
+ },
50
+ dependencies
51
+ };
52
+ } else if (browser === 'firefox') {
53
+ return {
54
+ name: 'firefox',
55
+ timeout: 2 * testTimeout,
56
+ expect: {
57
+ timeout: 2 * expectTimeout
58
+ },
59
+ use: {
60
+ ..._test.devices['Desktop Firefox'],
61
+ ...commonConfig
62
+ },
63
+ dependencies
64
+ };
65
+ } else if (browser === 'safari') {
66
+ return {
67
+ name: 'webkit',
68
+ timeout: 4 * testTimeout,
69
+ expect: {
70
+ timeout: 4 * expectTimeout
71
+ },
72
+ use: {
73
+ ..._test.devices['Desktop Safari'],
74
+ ...commonConfig
75
+ },
76
+ dependencies
77
+ };
78
+ } else {
79
+ return false;
80
+ }
81
+ }
82
+ function getProjects({
83
+ browsers,
84
+ isAuthMode,
85
+ authFilePath,
86
+ expectTimeout,
87
+ testTimeout
88
+ }) {
89
+ return browsers.map(browserName => getBrowserConfig({
90
+ browserName,
91
+ isAuthMode,
92
+ authFilePath,
93
+ expectTimeout,
94
+ testTimeout
95
+ })).filter(Boolean);
96
+ }
97
+ function getTestDir(bddMode, cwd) {
98
+ return bddMode ? (0, _bddFramework.defineBddConfig)({
99
+ paths: [_path.default.join(cwd, 'uat', '**', '*.feature')],
100
+ import: [_path.default.join(cwd, 'uat', '**', 'steps', '*.spec.js')],
101
+ featuresRoot: _path.default.join(cwd, 'uat'),
102
+ outputDir: _path.default.join(cwd, 'uat', '.features-gen'),
103
+ publish: true
104
+ }) : _path.default.join(cwd, 'uat');
105
+ }
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = createTestRunner;
7
+ exports.default = void 0;
8
8
  var _child_process = require("child_process");
9
9
  var _path = _interopRequireDefault(require("path"));
10
10
  var _customCommands = require("./custom-commands");
@@ -13,94 +13,51 @@ var _envInitializer = require("./env-initializer");
13
13
  var _logger = require("../../utils/logger");
14
14
  var _readConfigFile = require("./readConfigFile");
15
15
  var _rootPath = require("../../utils/rootPath");
16
- function createTestRunner() {
17
- // Access the command line arguments
18
- const userArgs = process.argv.slice(2);
19
- const userArgsObject = (0, _cliArgsToObject.cliArgsToObject)(userArgs);
20
-
21
- // eslint-disable-next-line
22
- const tagArgs = userArgsObject['tags'];
23
- const {
24
- debug,
25
- mode = 'dev',
26
- bddMode = false,
27
- headless = false
28
- } = (0, _readConfigFile.generateConfigFromFile)();
29
-
30
- // Environment variables Initialization
31
- (0, _envInitializer.initializeEnvConfig)(userArgsObject.mode ? userArgsObject.mode : mode);
16
+ function parseUserArgs() {
17
+ return (0, _cliArgsToObject.cliArgsToObject)(process.argv.slice(2));
18
+ }
19
+ function getPlaywrightArgs(userArgsObject, debug, bddMode, tagArgs, headless) {
32
20
  const playwrightArgs = (0, _cliArgsToObject.objectToCliArgs)(userArgsObject, key => !_customCommands.CUSTOM_COMMANDS.includes(key));
33
21
  if (debug) {
34
22
  playwrightArgs.push('--debug');
35
23
  }
36
- if (tagArgs) {
37
- playwrightArgs.push(`--grep ${tagArgs}`);
24
+ if (!bddMode && tagArgs) {
25
+ playwrightArgs.push('--grep');
26
+ playwrightArgs.push(tagArgs);
38
27
  }
39
28
  if (!headless && !userArgsObject.headed) {
40
29
  playwrightArgs.push('--headed');
41
30
  }
42
-
43
- // ZDTetsting test --tags=@live
44
- // Command and arguments for npx playwright test
45
- const playwrightPath = _path.default.resolve((0, _rootPath.getExecutableBinaryPath)('playwright'));
46
- const command = playwrightPath;
47
-
48
- // npm run bddgen && npm run playwright test
49
-
50
- const configPath = (0, _readConfigFile.isUserConfigFileAvailable)() ? require.resolve('./setup/config-creator.js') : require.resolve('../../../playwright.config.js');
51
- const args = ['test', '--config', configPath].concat(playwrightArgs);
52
- // Spawn the child process
53
-
54
- let promises = [];
55
- if (bddMode) {
56
- const beforeCommand = 'node';
57
- const bddGenPath = _path.default.resolve(_path.default.join(__dirname, '../', '../', 'bdd-framework', 'cli', 'index.js'));
58
- const beforeArgs = [bddGenPath, '-c', configPath];
59
- const preprocessingPromise = new Promise((resolve, reject) => {
60
- const childProcessForPreprocessing = (0, _child_process.spawn)(beforeCommand, beforeArgs, {
61
- stdio: 'inherit'
62
- });
63
- childProcessForPreprocessing.on('error', data => {
64
- _logger.Logger.log(_logger.Logger.FAILURE_TYPE, data);
65
- reject();
66
- });
67
- childProcessForPreprocessing.on('exit', code => {
68
- if (code === 0) {
69
- _logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Feature Files Processed Successfully');
70
- resolve();
71
- } else {
72
- reject(`BddGen exited with code ${code}`);
73
- }
74
- });
31
+ return playwrightArgs;
32
+ }
33
+ function runPreprocessing(tagArgs, configPath) {
34
+ const beforeCommand = 'node';
35
+ const bddGenPath = _path.default.resolve(__dirname, '../', '../', 'bdd-framework', 'cli', 'index.js');
36
+ const beforeArgs = [bddGenPath, '-c', configPath];
37
+ if (tagArgs) {
38
+ beforeArgs.push('--tags');
39
+ beforeArgs.push(tagArgs);
40
+ }
41
+ return new Promise((resolve, reject) => {
42
+ const childProcessForPreprocessing = (0, _child_process.spawn)(beforeCommand, beforeArgs, {
43
+ stdio: 'inherit'
75
44
  });
76
- promises.push(preprocessingPromise);
77
- } else {
78
- const beforeCommand = 'node';
79
- const bddGenPath = _path.default.resolve(_path.default.join(__dirname, '../', '../', 'parser', 'verifier.js'));
80
- const beforeArgs = [bddGenPath];
81
- const preprocessingPromise = new Promise((resolve, reject) => {
82
- const childProcessForPreprocessing = (0, _child_process.spawn)(beforeCommand, beforeArgs);
83
-
84
- // Handle the output and errors for the first command
85
- childProcessForPreprocessing.stdout.on('data', data => {
86
- _logger.Logger.log(_logger.Logger.INFO_TYPE, data);
87
- });
88
- childProcessForPreprocessing.stderr.on('data', data => {
89
- _logger.Logger.log(_logger.Logger.FAILURE_TYPE, data);
90
- reject();
91
- });
92
- childProcessForPreprocessing.on('close', code => {
93
- if (code === 0) {
94
- _logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Feature Files Processed Successfully');
95
- resolve();
96
- } else {
97
- reject(`Preprocessing exited with code ${code}`);
98
- }
99
- });
45
+ childProcessForPreprocessing.on('error', data => {
46
+ _logger.Logger.log(_logger.Logger.FAILURE_TYPE, data);
47
+ reject();
100
48
  });
101
- promises.push(preprocessingPromise);
102
- }
103
- Promise.all(promises).then(() => {
49
+ childProcessForPreprocessing.on('exit', code => {
50
+ if (code === 0) {
51
+ _logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Feature Files Processed Successfully');
52
+ resolve();
53
+ } else {
54
+ reject(`BddGen exited with code ${code}`);
55
+ }
56
+ });
57
+ });
58
+ }
59
+ function runPlaywright(command, args) {
60
+ return new Promise((resolve, reject) => {
104
61
  const childProcessForRunningPlaywright = (0, _child_process.spawn)(command, args, {
105
62
  stdio: 'inherit'
106
63
  });
@@ -110,23 +67,38 @@ function createTestRunner() {
110
67
  childProcessForRunningPlaywright.on('exit', (code, signal) => {
111
68
  if (code !== 0) {
112
69
  _logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Child Process Exited with Code ${code} and Signal ${signal}`);
70
+ reject(`Child Process Exited with Code ${code} and Signal ${signal}`);
113
71
  } else {
114
72
  _logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Test Ran Successfully');
73
+ resolve();
115
74
  }
116
- process.exit();
117
- });
118
- process.on('exit', () => {
119
- _logger.Logger.log(_logger.Logger.INFO_TYPE, 'Terminating Playwright Process...');
120
- //childProcess.kill();
121
- return;
122
75
  });
123
- process.on('SIGINT', () => {
124
- _logger.Logger.log(_logger.Logger.INFO_TYPE, 'Cleaning up...');
125
- //childProcess.kill();
126
- process.exit();
127
- });
128
- }).catch(err => {
76
+ });
77
+ }
78
+ function main() {
79
+ const userArgsObject = parseUserArgs();
80
+ // eslint-disable-next-line
81
+ const tagArgs = userArgsObject['tags'];
82
+ const {
83
+ debug,
84
+ mode = 'dev',
85
+ bddMode = false,
86
+ headless = false
87
+ } = (0, _readConfigFile.generateConfigFromFile)();
88
+ const playwrightArgs = getPlaywrightArgs(userArgsObject, debug, bddMode, tagArgs, headless);
89
+ (0, _envInitializer.initializeEnvConfig)(userArgsObject.mode ? userArgsObject.mode : mode);
90
+ const playwrightPath = _path.default.resolve((0, _rootPath.getExecutableBinaryPath)('playwright'));
91
+ const command = playwrightPath;
92
+ const configPath = (0, _readConfigFile.isUserConfigFileAvailable)() ? require.resolve('./setup/config-creator.js') : require.resolve('../../../playwright.config.js');
93
+ const args = ['test', '--config', configPath].concat(playwrightArgs);
94
+ let promises = [];
95
+ if (bddMode) {
96
+ promises.push(runPreprocessing(tagArgs, configPath));
97
+ }
98
+ Promise.all(promises).then(() => runPlaywright(command, args)).catch(err => {
129
99
  _logger.Logger.log(_logger.Logger.FAILURE_TYPE, err);
130
- process.exit();
100
+ process.exit(1);
131
101
  });
132
- }
102
+ }
103
+ var _default = main;
104
+ exports.default = _default;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @typedef {Object|null} viewportConfig
3
+ * @property {number} width - width of the viewport
4
+ * @property {number} height - height of the viewport
5
+ */
1
6
  /**
2
7
  * Represents the user configuration object.
3
8
  * @typedef {Object} UserConfig
@@ -17,6 +22,7 @@
17
22
  * @property {Object} additionalPages: custom pages configuration
18
23
  * @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
19
24
  * @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
25
+ * @property {viewportConfig} viewport: viewport configuration for the browser. If null, it will take the screen width and height
20
26
  */
21
27
 
22
28
  /**
@@ -31,5 +37,6 @@ module.exports = {
31
37
  trace: true,
32
38
  video: true,
33
39
  featureFilesFolder: 'feature-files',
34
- stepDefinitionsFolder: 'steps'
40
+ stepDefinitionsFolder: 'steps',
41
+ viewport: null
35
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.0.6",
3
+ "version": "0.0.7-exp.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -32,13 +32,15 @@
32
32
  "fast-glob": "^3.3.1",
33
33
  "jest": "^29.6.2",
34
34
  "jest-environment-jsdom": "^29.6.2",
35
- "msw": "^1.2.3",
36
- "react": "16.13.1",
37
- "react-dom": "16.13.1"
35
+ "msw": "^1.2.3"
38
36
  },
39
37
  "bin": {
40
38
  "ZDTestingFramework": "./bin/cli.js"
41
39
  },
40
+ "peerDependencies": {
41
+ "react": "16.13.1",
42
+ "react-dom": "16.13.1"
43
+ },
42
44
  "devDependencies": {
43
45
  "@babel/cli": "^7.22.15",
44
46
  "@babel/core": "^7.22.17",