@zohodesk/testinglibrary 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,18 +1,18 @@
1
- # Testing Framework
2
-
3
- ## Framework that abstracts the configuration for playwright and Jest
4
-
5
- - Playwright
6
- - Jest
7
-
8
- ## Cli
9
-
10
- ## Feature Supported
11
-
12
- ### Run TestCase
13
-
14
- - npm run test
15
- ### Generate Report
16
-
17
- - npm run report
1
+ # Testing Framework
2
+
3
+ ## Framework that abstracts the configuration for playwright and Jest
4
+
5
+ - Playwright
6
+ - Jest
7
+
8
+ ## Cli
9
+
10
+ ## Feature Supported
11
+
12
+ ### Run TestCase
13
+
14
+ - npm run test
15
+ ### Generate Report
16
+
17
+ - npm run report
18
18
 
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
-
2
+
3
3
  require('../src/lib/cli');
@@ -1,16 +1,16 @@
1
- const path = require('path');
2
- const { spawn } = require('child_process');
3
- const { Logger } = require('../src/utils/logger');
4
- const getFilePathWithExtension = require('../src/utils/getFilePath');
5
-
6
- const playwrightPath = path.resolve('node_modules', '.bin', getFilePathWithExtension('playwright'));
7
- const command = playwrightPath;
8
- const args = ['install'];
9
-
10
- Logger.log(Logger.INFO_TYPE, 'Downloading browsers for running tests');
11
-
12
- const childProcess = spawn(command, args, { stdio: 'inherit' });
13
-
14
- childProcess.on('error', (error) => {
15
- Logger.log(Logger.FAILURE_TYPE, error);
1
+ const path = require('path');
2
+ const { spawn } = require('child_process');
3
+ const { Logger } = require('../src/utils/logger');
4
+ const getFilePathWithExtension = require('../src/utils/getFilePath');
5
+
6
+ const playwrightPath = path.resolve('node_modules', '.bin', getFilePathWithExtension('playwright'));
7
+ const command = playwrightPath;
8
+ const args = ['install'];
9
+
10
+ Logger.log(Logger.INFO_TYPE, 'Downloading browsers for running tests');
11
+
12
+ const childProcess = spawn(command, args, { stdio: 'inherit' });
13
+
14
+ childProcess.on('error', (error) => {
15
+ Logger.log(Logger.FAILURE_TYPE, error);
16
16
  });
package/changelog.md ADDED
@@ -0,0 +1,11 @@
1
+ # Testing Framework
2
+
3
+ ## Framework that abstracts the configuration for playwright and Jest
4
+
5
+ # 0.0.2
6
+
7
+ - Fix for Finding directories inside node_modules folder
8
+
9
+ # 0.0.1
10
+
11
+ - test and report command support
package/jest.config.js CHANGED
@@ -1,64 +1,64 @@
1
- const path = require('path');
2
- const { existsSync } = require('fs');
3
- const appPath = process.cwd();
4
-
5
- const appGlobals = path.resolve(appPath, '__testUtils__', 'globals.js');
6
-
7
- module.exports = {
8
- rootDir: process.cwd(),
9
- testEnvironment: 'jsdom',
10
-
11
- setupFilesAfterEnv: [
12
- existsSync(appGlobals) && appGlobals,
13
- path.resolve(__dirname, 'src', 'core', 'jest', 'setup', 'index.js')
14
- ].filter(Boolean),
15
-
16
- transform: {
17
- '^.+\\.(js|jsx)$': path.resolve(
18
- __dirname,
19
- 'src',
20
- 'core',
21
- 'jest',
22
- 'preprocessor',
23
- 'jsPreprocessor.js'
24
- )
25
- },
26
-
27
- modulePathIgnorePatterns: ['/build/'],
28
-
29
- transformIgnorePatterns: [
30
- '/node_modules/(?!(@zohodesk)/)'
31
- ],
32
-
33
- testPathIgnorePatterns: [
34
- '/node_modules/',
35
- '/build/',
36
- '/uat/'
37
- ],
38
-
39
- watchPathIgnorePatterns: [
40
- '/node_modules/',
41
- '/build/'
42
- ],
43
-
44
- clearMocks: true,
45
- resetMocks: false,
46
-
47
- collectCoverage: true,
48
- collectCoverageFrom: ['src/**/*.js'],
49
- coverageDirectory: './build/cov',
50
- coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
51
- coverageThreshold: {
52
- global: {
53
- branches: 100,
54
- functions: 100,
55
- lines: 100,
56
- statements: 100
57
- }
58
- },
59
- globals: {
60
- __DEVELOPMENT__: true,
61
- __DOCS__: false,
62
- __TEST__: true
63
- }
1
+ const path = require('path');
2
+ const { existsSync } = require('fs');
3
+ const appPath = process.cwd();
4
+
5
+ const appGlobals = path.resolve(appPath, '__testUtils__', 'globals.js');
6
+
7
+ module.exports = {
8
+ rootDir: process.cwd(),
9
+ testEnvironment: 'jsdom',
10
+
11
+ setupFilesAfterEnv: [
12
+ existsSync(appGlobals) && appGlobals,
13
+ path.resolve(__dirname, 'src', 'core', 'jest', 'setup', 'index.js')
14
+ ].filter(Boolean),
15
+
16
+ transform: {
17
+ '^.+\\.(js|jsx)$': path.resolve(
18
+ __dirname,
19
+ 'src',
20
+ 'core',
21
+ 'jest',
22
+ 'preprocessor',
23
+ 'jsPreprocessor.js'
24
+ )
25
+ },
26
+
27
+ modulePathIgnorePatterns: ['/build/'],
28
+
29
+ transformIgnorePatterns: [
30
+ '/node_modules/(?!(@zohodesk)/)'
31
+ ],
32
+
33
+ testPathIgnorePatterns: [
34
+ '/node_modules/',
35
+ '/build/',
36
+ '/uat/'
37
+ ],
38
+
39
+ watchPathIgnorePatterns: [
40
+ '/node_modules/',
41
+ '/build/'
42
+ ],
43
+
44
+ clearMocks: true,
45
+ resetMocks: false,
46
+
47
+ collectCoverage: true,
48
+ collectCoverageFrom: ['src/**/*.js'],
49
+ coverageDirectory: './build/cov',
50
+ coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
51
+ coverageThreshold: {
52
+ global: {
53
+ branches: 100,
54
+ functions: 100,
55
+ lines: 100,
56
+ statements: 100
57
+ }
58
+ },
59
+ globals: {
60
+ __DEVELOPMENT__: true,
61
+ __DOCS__: false,
62
+ __TEST__: true
63
+ }
64
64
  };