Hi guys, I’m trying to check a date format in the response body, but without success. How can I take the test?
I’ve already tried
var jsonData = pm.response.json();
var date = jsonData.dataExpurgo;
var moment = require ('moment');
pm.test("Checking data format", function () {
pm.expect(date).to.include(moment(date).format('YYYY-MM-DDTHH:mm:ss:sssZ'));
});