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:
@@ -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