Skip to content

Commit da1249b

Browse files
committed
💡 ignoring these lines in Jest testing for coverage
1 parent 8ecd039 commit da1249b

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/FileCabinet/SuiteScripts/CS/customModule_CS.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
];
2626
//AMD & CommonJS compatibility stuff
2727
// CommonJS
28+
/* istanbul ignore next */
2829
if (typeof module !== 'undefined' && typeof require !== 'undefined') {
2930
// Set ID for identifying in Jest
3031
module.id = '/SuiteScripts/CS/csExampleModule_CS';
3132
module.exports = csExampleModule_CS.apply(this, Dependencies.map(require));
3233
module.exports.mockable = csExampleModule_CS; // module loader with mockable dependencies
3334
}
3435
// AMD
36+
/* istanbul ignore next */
3537
if (typeof define !== 'undefined') {
38+
/* istanbul ignore next */
3639
define(Dependencies, csExampleModule_CS);
3740
}
3841
})();

src/FileCabinet/SuiteScripts/Modules/aModule.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
const Dependencies = ['N/query', 'N/log'];
2222
//AMD & CommonJS compatibility stuff
2323
// CommonJS
24+
/* istanbul ignore next */
2425
if (typeof module !== 'undefined' && typeof require !== 'undefined') {
2526
// Set ID for identifying in Jest
2627
module.id = '/SuiteScripts/Modules/aModule';
2728
module.exports = aModule.apply(this, Dependencies.map(require));
2829
module.exports.mockable = aModule; // module loader with mockable dependencies
2930
}
30-
// AMD
31+
// AMD /* istanbul ignore next */
3132
if (typeof define !== 'undefined') {
33+
/* istanbul ignore next */
3234
define(Dependencies, aModule);
3335
}
3436
})();
@@ -69,13 +71,15 @@ function aModule(query, log) {
6971
return QueryResult.prefix;
7072
};
7173
// * This is for Jest to have direct access to all methods for running tests
74+
/* istanbul ignore next */
7275
if (typeof module !== 'undefined' && typeof require !== 'undefined') {
7376
return {
7477
GetVendorPrefix,
7578
RunQuery,
7679
};
7780
}
7881
// * These methods are returned in NetSuite
82+
/* istanbul ignore next */
7983
return {
8084
GetVendorPrefix,
8185
};

0 commit comments

Comments
 (0)