Here is a proper Postman test:
const jsonData = pm.response.json();
pm.test('Has data', function() {
pm.expect(jsonData).to.have.property('data');
});
The above will either PASS or FAIL yor postman request based on the presence of the data property in the response.