Fixing validator setup
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 34s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 50s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m48s
Music Collection CI Workflow / deploy (push) Successful in 2s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 34s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 50s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m48s
Music Collection CI Workflow / deploy (push) Successful in 2s
This commit is contained in:
parent
8c8248f8c0
commit
077be202a0
45
backend/package-lock.json
generated
45
backend/package-lock.json
generated
@ -9,11 +9,14 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@nestjs/class-validator": "^0.13.4",
|
||||||
"@nestjs/common": "^11.0.1",
|
"@nestjs/common": "^11.0.1",
|
||||||
"@nestjs/config": "^4.0.2",
|
"@nestjs/config": "^4.0.2",
|
||||||
"@nestjs/core": "^11.0.1",
|
"@nestjs/core": "^11.0.1",
|
||||||
"@nestjs/platform-express": "^11.0.1",
|
"@nestjs/platform-express": "^11.0.1",
|
||||||
"@nestjs/typeorm": "^11.0.0",
|
"@nestjs/typeorm": "^11.0.0",
|
||||||
|
"class-transformer": "^0.5.1",
|
||||||
|
"class-validator": "^0.14.1",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"pg": "^8.14.1",
|
"pg": "^8.14.1",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
@ -2087,6 +2090,15 @@
|
|||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/class-validator": {
|
||||||
|
"version": "0.13.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@nestjs/class-validator/-/class-validator-0.13.4.tgz",
|
||||||
|
"integrity": "sha512-/mqZL36LJ5uV5WDhi87Cd52IssuO+SStaOr2+6sBsvCCGUWkoJes4Wwzmm3m/gdHH+tsNxX60sVSzYcU6hAy9Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"libphonenumber-js": "^1.9.43",
|
||||||
|
"validator": "^13.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@nestjs/cli": {
|
"node_modules/@nestjs/cli": {
|
||||||
"version": "11.0.5",
|
"version": "11.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-11.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-11.0.5.tgz",
|
||||||
@ -3076,6 +3088,11 @@
|
|||||||
"@types/superagent": "^8.1.0"
|
"@types/superagent": "^8.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/validator": {
|
||||||
|
"version": "13.12.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.3.tgz",
|
||||||
|
"integrity": "sha512-2ipwZ2NydGQJImne+FhNdhgRM37e9lCev99KnqkbFHd94Xn/mErARWI1RSLem1QA19ch5kOhzIZd7e8CA2FI8g=="
|
||||||
|
},
|
||||||
"node_modules/@types/yargs": {
|
"node_modules/@types/yargs": {
|
||||||
"version": "17.0.33",
|
"version": "17.0.33",
|
||||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
|
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
|
||||||
@ -4412,6 +4429,21 @@
|
|||||||
"integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
|
"integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/class-transformer": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz",
|
||||||
|
"integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw=="
|
||||||
|
},
|
||||||
|
"node_modules/class-validator": {
|
||||||
|
"version": "0.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz",
|
||||||
|
"integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/validator": "^13.11.8",
|
||||||
|
"libphonenumber-js": "^1.10.53",
|
||||||
|
"validator": "^13.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cli-cursor": {
|
"node_modules/cli-cursor": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||||
@ -7456,6 +7488,11 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/libphonenumber-js": {
|
||||||
|
"version": "1.12.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.6.tgz",
|
||||||
|
"integrity": "sha512-PJiS4ETaUfCOFLpmtKzAbqZQjCCKVu2OhTV4SVNNE7c2nu/dACvtCqj4L0i/KWNnIgRv7yrILvBj5Lonv5Ncxw=="
|
||||||
|
},
|
||||||
"node_modules/lines-and-columns": {
|
"node_modules/lines-and-columns": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||||
@ -10448,6 +10485,14 @@
|
|||||||
"node": ">=10.12.0"
|
"node": ">=10.12.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/validator": {
|
||||||
|
"version": "13.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/validator/-/validator-13.15.0.tgz",
|
||||||
|
"integrity": "sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vary": {
|
"node_modules/vary": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
@ -20,11 +20,14 @@
|
|||||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@nestjs/class-validator": "^0.13.4",
|
||||||
"@nestjs/common": "^11.0.1",
|
"@nestjs/common": "^11.0.1",
|
||||||
"@nestjs/config": "^4.0.2",
|
"@nestjs/config": "^4.0.2",
|
||||||
"@nestjs/core": "^11.0.1",
|
"@nestjs/core": "^11.0.1",
|
||||||
"@nestjs/platform-express": "^11.0.1",
|
"@nestjs/platform-express": "^11.0.1",
|
||||||
"@nestjs/typeorm": "^11.0.0",
|
"@nestjs/typeorm": "^11.0.0",
|
||||||
|
"class-transformer": "^0.5.1",
|
||||||
|
"class-validator": "^0.14.1",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"pg": "^8.14.1",
|
"pg": "^8.14.1",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
|
@ -3,8 +3,10 @@ import { getRepositoryToken } from '@nestjs/typeorm';
|
|||||||
import { SongController } from './song.controller';
|
import { SongController } from './song.controller';
|
||||||
import { SongService } from './song.service';
|
import { SongService } from './song.service';
|
||||||
import { Song } from './song.entity';
|
import { Song } from './song.entity';
|
||||||
|
import { Album } from '../album/album.entity';
|
||||||
|
|
||||||
const mockSong = new Song();
|
const mockSong = new Song();
|
||||||
|
const mockAlbum = new Album();
|
||||||
|
|
||||||
describe('SongController', () => {
|
describe('SongController', () => {
|
||||||
let controller: SongController;
|
let controller: SongController;
|
||||||
@ -24,6 +26,16 @@ describe('SongController', () => {
|
|||||||
remove: jest.fn().mockResolvedValue(null),
|
remove: jest.fn().mockResolvedValue(null),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: getRepositoryToken(Album),
|
||||||
|
useValue: {
|
||||||
|
findAll: jest.fn().mockResolvedValue([mockAlbum]),
|
||||||
|
findOneById: jest.fn().mockResolvedValue(mockAlbum),
|
||||||
|
create: jest.fn().mockResolvedValue(1),
|
||||||
|
update: jest.fn().mockResolvedValue("Album updated successfully"),
|
||||||
|
remove: jest.fn().mockResolvedValue(null),
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
|
@ -2,8 +2,10 @@ import { Test, TestingModule } from '@nestjs/testing';
|
|||||||
import { getRepositoryToken } from '@nestjs/typeorm';
|
import { getRepositoryToken } from '@nestjs/typeorm';
|
||||||
import { SongService } from './song.service';
|
import { SongService } from './song.service';
|
||||||
import { Song } from './song.entity';
|
import { Song } from './song.entity';
|
||||||
|
import { Album } from '../album/album.entity';
|
||||||
|
|
||||||
const mockSong = new Song();
|
const mockSong = new Song();
|
||||||
|
const mockAlbum = new Album();
|
||||||
|
|
||||||
describe('SongService', () => {
|
describe('SongService', () => {
|
||||||
let service: SongService;
|
let service: SongService;
|
||||||
@ -22,6 +24,16 @@ describe('SongService', () => {
|
|||||||
remove: jest.fn().mockResolvedValue(null),
|
remove: jest.fn().mockResolvedValue(null),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: getRepositoryToken(Album),
|
||||||
|
useValue: {
|
||||||
|
findAll: jest.fn().mockResolvedValue([mockAlbum]),
|
||||||
|
findOneById: jest.fn().mockResolvedValue(mockAlbum),
|
||||||
|
create: jest.fn().mockResolvedValue(1),
|
||||||
|
update: jest.fn().mockResolvedValue("Album updated successfully"),
|
||||||
|
remove: jest.fn().mockResolvedValue(null),
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user