suitescript-mocks
Version:
Set of mocks for unit testing Netsuite Suitescript 2.*
22 lines (17 loc) • 459 B
JavaScript
const { options, addPromise, assignConstructor } = require("../../helpers.cjs");
class ResultSet {
results = [];
columns = [];
each = (callback) => {
for (let i = 0; i < this.results.length && i < 4000; i++) {
if (callback(this.results[i]) === false) return;
}
};
getRange = (options) => {
return this.results.slice(options.start, options.end);
};
}
module.exports = ResultSet;