MCPcopy
hub / github.com/exceljs/exceljs / runTests

Function runTests

test/testPerformance.js:151–179  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

149}
150
151function runTests(options) {
152 return function() {
153 const results = [];
154 let promise = Promise.resolve();
155 for (let pass = 0; pass < passes; pass++) {
156 // run each test with a 10 second pause between (to let GC do its stuff)
157 promise = promise.then(() =>
158 runTest(options)
159 .then(result => {
160 results.push(result);
161 })
162 .delay(sleepTime)
163 .then(() => {
164 try {
165 fs.unlinkSync(testFilename);
166 } catch (ex) {
167 console.error(`Error deleting file:${ex.message}`);
168 }
169 })
170 .delay(1000)
171 );
172 }
173 return promise.then(() => {
174 const testResult = reduceResults(results);
175 const key = options.workbook[0] + options.style[0] + options.str[0];
176 resultSheet.lastRow.getCell(key).value = testResult;
177 });
178 };
179}
180
181let mainPromise = Promise.resolve();
182// var mainPromise = execute(125, 'stream', 'plain', 'own');

Callers 1

testPerformance.jsFile · 0.85

Calls 4

runTestFunction · 0.85
reduceResultsFunction · 0.85
getCellMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…