Refactor code formatting for improved readability
- Reformatted import statements and object properties across multiple files to enhance code clarity and maintainability. - Ensured consistent indentation and line breaks in test specifications and service implementations, improving overall code structure.
This commit is contained in:
@@ -118,9 +118,9 @@ describe('Company settings (e2e)', () => {
|
||||
})
|
||||
.expect(200);
|
||||
|
||||
expect((updated.body as { gpsIntervalSeconds: number }).gpsIntervalSeconds).toBe(
|
||||
15,
|
||||
);
|
||||
expect(
|
||||
(updated.body as { gpsIntervalSeconds: number }).gpsIntervalSeconds,
|
||||
).toBe(15);
|
||||
expect(
|
||||
(updated.body as { checkoutWarningRadiusMeters: number })
|
||||
.checkoutWarningRadiusMeters,
|
||||
|
||||
@@ -202,7 +202,9 @@ describe('Privileges (e2e)', () => {
|
||||
expect(me.body.privilege).toMatchObject({
|
||||
id: adminPrivilegeId,
|
||||
});
|
||||
expect(me.body.permissions['ADMIN.SETTINGS.USER.PRIVILEGES'].view).toBe(true);
|
||||
expect(me.body.permissions['ADMIN.SETTINGS.USER.PRIVILEGES'].view).toBe(
|
||||
true,
|
||||
);
|
||||
|
||||
await request(app.getHttpServer())
|
||||
.patch(`/users/${otherUserId}/privilege`)
|
||||
|
||||
@@ -135,7 +135,8 @@ describe('Timeline (e2e)', () => {
|
||||
});
|
||||
|
||||
it('ingests footprints and returns them on admin timeline query', async () => {
|
||||
const recordedAt = DateTime.fromUnixMs(Date.now()).startOfDay().value + 3_600_000;
|
||||
const recordedAt =
|
||||
DateTime.fromUnixMs(Date.now()).startOfDay().value + 3_600_000;
|
||||
|
||||
const ingest = await request(app.getHttpServer())
|
||||
.post('/timeline/footprints')
|
||||
@@ -143,14 +144,21 @@ describe('Timeline (e2e)', () => {
|
||||
.send({
|
||||
points: [
|
||||
{ latitude: -6.2, longitude: 106.8, recordedAt },
|
||||
{ latitude: -6.201, longitude: 106.801, recordedAt: recordedAt + 5000 },
|
||||
{
|
||||
latitude: -6.201,
|
||||
longitude: 106.801,
|
||||
recordedAt: recordedAt + 5000,
|
||||
},
|
||||
],
|
||||
})
|
||||
.expect(201);
|
||||
|
||||
expect((ingest.body as { inserted: number }).inserted).toBe(2);
|
||||
|
||||
const today = DateTime.fromUnixMs(Date.now()).startOfDay().format().slice(0, 10);
|
||||
const today = DateTime.fromUnixMs(Date.now())
|
||||
.startOfDay()
|
||||
.format()
|
||||
.slice(0, 10);
|
||||
const day = await request(app.getHttpServer())
|
||||
.get('/timeline')
|
||||
.query({ date: today, employeeId })
|
||||
@@ -168,7 +176,10 @@ describe('Timeline (e2e)', () => {
|
||||
});
|
||||
|
||||
it('returns activities-only timeline for the current user', async () => {
|
||||
const today = DateTime.fromUnixMs(Date.now()).startOfDay().format().slice(0, 10);
|
||||
const today = DateTime.fromUnixMs(Date.now())
|
||||
.startOfDay()
|
||||
.format()
|
||||
.slice(0, 10);
|
||||
const me = await request(app.getHttpServer())
|
||||
.get('/timeline/me')
|
||||
.query({ date: today })
|
||||
|
||||
Reference in New Issue
Block a user