-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dependabot/npm_and_yarn/next-auth-5.0.0-b…
…eta.20
- Loading branch information
Showing
104 changed files
with
2,083 additions
and
2,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
__test__/common/github/OAuthTokenRefreshingGitHubClient.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 125 additions & 0 deletions
125
__test__/projects/FilteringGitHubRepositoryDataSource.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
import { FilteringGitHubRepositoryDataSource } from "@/features/projects/domain" | ||
|
||
test("It returns all repositories when no hidden repositories are provided", async () => { | ||
const sut = new FilteringGitHubRepositoryDataSource({ | ||
hiddenRepositories: [], | ||
dataSource: { | ||
async getRepositories() { | ||
return [{ | ||
owner: "acme", | ||
name: "foo-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "main" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}, { | ||
owner: "acme", | ||
name: "bar-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "bar" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}] | ||
} | ||
} | ||
}) | ||
const repositories = await sut.getRepositories() | ||
expect(repositories.length).toEqual(2) | ||
}) | ||
|
||
test("It removes hidden repository", async () => { | ||
const sut = new FilteringGitHubRepositoryDataSource({ | ||
hiddenRepositories: ["acme/foo-openapi"], | ||
dataSource: { | ||
async getRepositories() { | ||
return [{ | ||
owner: "acme", | ||
name: "foo-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "main" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}, { | ||
owner: "acme", | ||
name: "bar-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "bar" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}] | ||
} | ||
} | ||
}) | ||
const repositories = await sut.getRepositories() | ||
expect(repositories.length).toEqual(1) | ||
}) | ||
|
||
test("It returns unmodified list when hidden repository was not found", async () => { | ||
const sut = new FilteringGitHubRepositoryDataSource({ | ||
hiddenRepositories: ["acme/baz-openapi"], | ||
dataSource: { | ||
async getRepositories() { | ||
return [{ | ||
owner: "acme", | ||
name: "foo-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "main" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}, { | ||
owner: "acme", | ||
name: "bar-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "bar" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}] | ||
} | ||
} | ||
}) | ||
const repositories = await sut.getRepositories() | ||
expect(repositories.length).toEqual(2) | ||
}) | ||
|
||
test("It removes multiple hidden repositories", async () => { | ||
const sut = new FilteringGitHubRepositoryDataSource({ | ||
hiddenRepositories: ["acme/foo-openapi", "acme/bar-openapi"], | ||
dataSource: { | ||
async getRepositories() { | ||
return [{ | ||
owner: "acme", | ||
name: "foo-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "main" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}, { | ||
owner: "acme", | ||
name: "bar-openapi", | ||
defaultBranchRef: { | ||
id: "12345678", | ||
name: "bar" | ||
}, | ||
branches: [], | ||
tags: [] | ||
}] | ||
} | ||
} | ||
}) | ||
const repositories = await sut.getRepositories() | ||
expect(repositories.length).toEqual(0) | ||
}) |
Oops, something went wrong.