Skip to content

Commit 60d448d

Browse files
authored
fix: throw out year dependent test (#455)
* fix age test (throw out year dependent age calculation) * clean up e2e spec file * undo delete tested variable
1 parent 747b1f6 commit 60d448d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/test/app.e2e-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Test, TestingModule } from '@nestjs/testing';
22
import { INestApplication } from '@nestjs/common';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AppModule } from '../src/app.module';
55

66
describe('AppController (e2e)', () => {

frontend/src/helpers/format/date-helpers.spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('Date Helpers', () => {
44
let birthday: Date
55
let date_one_year_one_day_ago: Date
66
let date_not_full_one_year: Date
7-
beforeEach( () => {
7+
beforeEach(() => {
88
birthday = new Date('2014-01-31T00:00:00.000Z')
99
date_one_year_one_day_ago = new Date(new Date().setFullYear(new Date().getFullYear() - 1))
1010
date_one_year_one_day_ago.setDate(date_one_year_one_day_ago.getDate() - 1)
@@ -13,7 +13,6 @@ describe('Date Helpers', () => {
1313
})
1414
describe('calculated age', () => {
1515
it('should return the age given his/her birthday', () => {
16-
expect(calculateAge(birthday)).toEqual(8)
1716
expect(calculateAge(date_one_year_one_day_ago)).toEqual(1)
1817
expect(calculateAge(date_not_full_one_year)).toEqual(0)
1918
});

0 commit comments

Comments
 (0)