-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EPMRPP-89644 || Implement attachments support
- Loading branch information
1 parent
944e183
commit e999603
Showing
7 changed files
with
61 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Task } from "vitest"; | ||
Check failure on line 1 in src/reportingApi.ts GitHub Actions / test
|
||
import * as Models from './models'; | ||
import { isRPTaskMeta } from './utils'; | ||
|
||
const injectRPTaskMeta = (task: Task) => { | ||
if (isRPTaskMeta(task.meta)) { | ||
return | ||
} | ||
|
||
(task.meta as Models.RPTaskMeta) = { | ||
...task.meta, | ||
test: { | ||
logs: [], | ||
} | ||
} | ||
} | ||
|
||
const attachment = (task: Task, data: Models.Attachment) => { | ||
injectRPTaskMeta(task); | ||
(task.meta as Models.RPTaskMeta).test.logs.push({ file: data, time: Date.now() }); | ||
} | ||
|
||
export const ReportingApi: Models.ReportingApi = { | ||
attachment | ||
} |
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