-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
581 additions
and
904 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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
const os = require('node:os'); | ||
|
||
test('should wrap a function with automatic attachment of its result', async () => { | ||
const diagnostics = () => JSON.stringify({ available_memory: os.freemem() }); | ||
const diagnostics = () => ({ available_memory: os.freemem() }); | ||
const wrapped = allure.createAttachment(diagnostics, 'diagnostics-{{0}}.json'); | ||
|
||
// Creates 'diagnostics-before.json' attachment | ||
expect(wrapped('before')).toMatch(/{"available_memory":\d+}/); | ||
expect(wrapped('before')).toEqual({ available_memory: expect.any(Number) }); | ||
// Consume some memory | ||
expect(Array.from({ length: 100000 }, () => Math.random())).toHaveLength(100000); | ||
// Creates 'diagnostics-after.json' attachment; the returned value is not changed by the wrapper | ||
expect(wrapped('after')).toMatch(/{"available_memory":\d+}/); | ||
expect(wrapped('after')).toEqual({ available_memory: expect.any(Number) }); | ||
}); |
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 was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
src/options/helpers/executor/providers/buildkite/BuildkiteInfoProvider.test.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.