Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions __test__/projects/CachingProjectDataSource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ test("It caches projects read from the data source", async () => {
}]
let cachedProjects: Project[] | undefined
const sut = new CachingProjectDataSource({
async getProjects() {
return projects
}
}, {
async get() {
return []
},
async set(projects) {
cachedProjects = projects
dataSource: {
async getProjects() {
return projects
}
},
async delete() {}
repository: {
async get() {
return []
},
async set(projects) {
cachedProjects = projects
},
async delete() {}
}
})
await sut.getProjects()
expect(cachedProjects).toEqual(projects)
Expand Down
Loading