Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
mamari90 committed Feb 9, 2024
1 parent b2d783c commit 57b627b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/statics.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const statusCodeRangeSeparator = "-"
const constants = require('./const')
const comparator = require('./comparator')


module.exports = {
Expand Down Expand Up @@ -96,10 +97,10 @@ function apiResponseElaborator(metricContext){
let duration = response[constants.RESPONSE_TIME_KEY];
let durationOk = duration <= metricContext.monitoringConfiguration.durationLimit



let bodyMatches = true
const bodyCompareStrategy = metricContext.monitoringConfiguration.bodyCompareStrategy
const bodyCompareStrategy = metricContext.monitoringConfiguration.bodyCompareStrategy
if (!isNull(bodyCompareStrategy)){
const expectedBody = metricContext.monitoringConfiguration.expectedBody
bodyMatches = new comparator().getStrategy(bodyCompareStrategy)(response.body, expectedBody)
Expand Down

0 comments on commit 57b627b

Please sign in to comment.