feature/IO-2769-Job-Totals-Testing
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const Dinero = require("dinero.js");
|
||||
const queries = require("../graphql-client/queries");
|
||||
const logger = require("../utils/logger");
|
||||
const { captureFixture } = require("./utils/seralizeHelper");
|
||||
|
||||
//****************************************************** */
|
||||
//****************************************************** */
|
||||
@@ -31,16 +30,8 @@ exports.totalsSsu = async function (req, res) {
|
||||
id: id
|
||||
});
|
||||
|
||||
// Extract the job data (the input for TotalsServerSide)
|
||||
const inputForTotals = job.jobs_by_pk;
|
||||
|
||||
// Capture the output of TotalsServerSide
|
||||
const newTotals = await TotalsServerSide({ body: { job: inputForTotals, client: client } }, res, true);
|
||||
|
||||
// Capture fixture data (input and output), using job.id for the filename.
|
||||
if (process.env?.SAVE_TOTALS_DATA === "true") {
|
||||
captureFixture(inputForTotals, newTotals);
|
||||
}
|
||||
const newTotals = await TotalsServerSide({ body: { job: job.jobs_by_pk, client: client } }, res, true);
|
||||
|
||||
const result = await client.setHeaders({ Authorization: BearerToken }).request(queries.UPDATE_JOB, {
|
||||
jobId: id,
|
||||
|
||||
Reference in New Issue
Block a user