From c224cc92cde0b0bddeafaec91b5c491d6398e277 Mon Sep 17 00:00:00 2001 From: Zakaria Mansouri Date: Sun, 26 Mar 2023 12:46:05 +0200 Subject: [PATCH] updated unit tests --- .../src/contributor/__snapshots__/index.spec.ts.snap | 4 ++-- .../src/repository/__snapshots__/index.spec.ts.snap | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/models/src/contributor/__snapshots__/index.spec.ts.snap b/packages/models/src/contributor/__snapshots__/index.spec.ts.snap index ba21e0c3a..49bbcd670 100644 --- a/packages/models/src/contributor/__snapshots__/index.spec.ts.snap +++ b/packages/models/src/contributor/__snapshots__/index.spec.ts.snap @@ -5,7 +5,7 @@ exports[`should match snapshot when providing all fields: errors 1`] = `Array [] exports[`should match snapshot when providing all fields: output 1`] = ` ContributorEntity { "avatarUrl": "https://avatars.githubusercontent.com/u/20110076?v=4", - "id": "20110076", + "id": "github/20110076", "repositories": Array [], "username": "ZibanPirate", } @@ -16,7 +16,7 @@ exports[`should match snapshot when providing required fields only: errors 1`] = exports[`should match snapshot when providing required fields only: output 1`] = ` ContributorEntity { "avatarUrl": "https://avatars.githubusercontent.com/u/20110076?v=4", - "id": "20110076", + "id": "github/20110076", "username": "ZibanPirate", } `; diff --git a/packages/models/src/repository/__snapshots__/index.spec.ts.snap b/packages/models/src/repository/__snapshots__/index.spec.ts.snap index 3479398dd..3cf1f1b18 100644 --- a/packages/models/src/repository/__snapshots__/index.spec.ts.snap +++ b/packages/models/src/repository/__snapshots__/index.spec.ts.snap @@ -9,6 +9,13 @@ RepositoryEntity { "owner": "dzcode-io", "provider": "github", "repository": "leblad", + "stats": RepositoryStatsEntity { + "contributionCount": 10, + "languages": Array [ + "TypeScript", + "Rust", + ], + }, } `; @@ -27,7 +34,7 @@ Array [ ValidationError { "children": Array [], "constraints": Object { - "isString": "provider must be a string", + "isIn": "provider must be one of the following values: github, gitlab", }, "property": "provider", "target": RepositoryEntity {},