# Got an error in testing

**URL:** <https://community.postman.com/t/got-an-error-in-testing/42460>\
**Category:** Help Hub\
**Created:** [December 29, 2022, 8:17pm UTC](https://community.postman.com/t/got-an-error-in-testing/42460 "2022-12-29T20:17:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aliahdab81](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@aliahdab81](https://community.postman.com/u/aliahdab81)\
**Post date:** [December 29, 2022, 8:17pm UTC](https://community.postman.com/t/got-an-error-in-testing/42460/1 "2022-12-29T20:17:14Z")

</div>

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_: I have one test failing and could not figure out what is the problem

_Details (like screenshots)_:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/a/0a078df77264488b197c7688d881e5533cda2efd.png)

_How I found the problem_:

```
{
				"name": "Get Opening Hours",
				"event": [
					{
						"listen": "test",
						"script": {
							"exec": [
								"pm.test(\"Status code is 200\", function(){\r",
								" pm.response.to.have.status(200);\r",
								"});\r",
								"\r",
								"// Get the hour\r",
								"var hour = parseInt(pm.response.json().dates[0].branches[0].openingHours[0].from.substring(0,2));\r",
								"\r",
								"pm.test(\"Time difference is right\", function(){\r",
								" // Modulo to fix when midnight is passed\r",
								" pm.expect( (hour) % 12 ).to.eql( (pm.environment.get(\"hour\") + parseInt(pm.environment.get(\"timeDiff\"))) % 12);\r",
								"});"
							],
							"type": "text/javascript"
						}
					}
				],
				"request": {
					"method": "GET",
					"header": [],
					"url": {
						"raw": "{{baseUrl}}/customers/{{customerId}}/openinghours",
						"host": [
							"{{baseUrl}}"
						],
						"path": [
							"customers",
							"{{customerId}}",
							"openinghours"
						]
					}
				},
				"response": []
			},

```

the problem is in pm.expect line , my question is how I can find the problem ?  
_I’ve already tried_:
