Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
paga16-hash committed Jan 31, 2024
1 parent fb090d1 commit e2a2098
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion alarm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dev": "npm run build && NODE_ENV=develop node --env-file=../.env .",
"build": "tsc && tsc-alias",
"watch": "tsc -w & tsc-alias -w & nodemon .",
"test": "cp ../.env .; vitest --run; rm .env",
"test": "cp ../.env .; vitest --run; rm .env;",
"coverage": "vitest --run --coverage",
"lint:fix": "eslint src/ --ext .js,.cjs,.mjs,.ts,.cts --fix",
"lint": "eslint src/ --ext .js,.cjs,.mjs,.ts,.cts",
Expand Down
2 changes: 1 addition & 1 deletion monitoring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dev": "npm run build && NODE_ENV=develop node --env-file=../.env .",
"build": "tsc && tsc-alias",
"watch": "tsc -w & tsc-alias -w & nodemon .",
"test": "cp ../.env .; vitest --run",
"test": "cp ../.env .; vitest --run; rm .env;",
"lint:fix": "eslint src/ --ext .js,.cjs,.mjs,.ts,.cts --fix",
"lint": "eslint src/ --ext .js,.cjs,.mjs,.ts,.cts",
"format:fix": "prettier --write src/",
Expand Down
2 changes: 1 addition & 1 deletion monitoring/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ if (process.env.NODE_ENV !== 'test') {
console.log(`Monitoring server listening on ${process.env.MONITORING_PORT}`)
await mongoConnect()
})
}
}
6 changes: 2 additions & 4 deletions monitoring/test/device/device.delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ describe('DELETE /devices/', (): void => {

// @ts-ignore
const deletion: Response = await monitoringService
.delete('/devices')
.delete('/devices/sensors/sen-10')
.set('Authorization', `Bearer ${TOKEN}`)
.send({ type: 'SENSOR', code: 'sen-10' })
expect(deletion.status).toBe(HttpStatusCode.OK)
expect(deletion.type).toBe('application/json')
})
Expand All @@ -57,9 +56,8 @@ describe('DELETE /devices/', (): void => {
.send(newCamera)
// @ts-ignore
const deletion: Response = await monitoringService
.delete('/devices')
.delete('/devices/cameras/cam-10')
.set('Authorization', `Bearer ${TOKEN}`)
.send({ type: 'CAMERA', code: 'cam-10' })
expect(deletion.status).toBe(HttpStatusCode.OK)
expect(deletion.type).toBe('application/json')
})
Expand Down
4 changes: 0 additions & 4 deletions monitoring/test/device/device.get.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ describe('GET /devices/', (): void => {
await populateDevices()
})

describe('GET /devices', (): void => {
// TODO: add test
})

describe('GET /devices/sensors', (): void => {
it('responds with a forbidden status if no auth token is provided', async (): Promise<void> => {
// @ts-ignore
Expand Down

0 comments on commit e2a2098

Please sign in to comment.