@@ -15,11 +15,19 @@ const CustomJestStubs = require('@vnetwork-solutions/ns-custom-stubs-template/cu
1515const SuiteCloudJestCustomStubs = SuiteCloudJestStubs . customStubs ;
1616// Add your custom stubs to SuiteCloudJestStubs
1717const MyCustomStubs = CustomJestStubs . customStubs ;
18+ /**
19+ * @typedef UseMinified
20+ * @type {Object }
21+ * @description Options for loading minified file
22+ * @property {boolean } value - T/F do you want to use a minified version in define statement
23+ * @property {String } minName='.min' - Optional alternative post fix identifier to add to file
24+ */
1825/**
1926 * @typedef ExcludeStub
2027 * @type {Object }
2128 * @property {String } name - "Directory/Path/ModuleName" -- CustomStub property to use
2229 * @property {String } path - Path to module for project -- generally you will use `\`${__dirname}/src/FileCabinet\``
30+ * @property {UseMinified } useMinified - Options for using or not using minified files locally
2331 * @description Array of module names and paths to use for them in the stubs package
2432 * @summary Here, you can control the paths for stubbed modules to their local file for Jest tests.
2533 */
@@ -32,10 +40,9 @@ const ExcludeStubs = [
3240 {
3341 name : '/SuiteScripts/Modules/aModule' ,
3442 path : `${ __dirname } /src/FileCabinet` ,
35- } ,
36- {
37- name : '/SuiteScripts/Modules/aModule.min' ,
38- path : `${ __dirname } /src/FileCabinet` ,
43+ useMinified : {
44+ value : false ,
45+ } ,
3946 } ,
4047] ;
4148
@@ -54,6 +61,12 @@ const BuildJestConfig = SuiteCloudJestConfiguration.build({
5461 '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$' ,
5562 '**.*\\.min\\.*' ,
5663 ] ,
64+ collectCoverageFrom : [
65+ '**/*.{js,jsx}' ,
66+ '!**/node_modules/**' ,
67+ '!**/__tests__/**' ,
68+ '!**/**min.js' ,
69+ ] ,
5770} ) ;
5871
5972module . exports = BuildJestConfig ;
0 commit comments