Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record on failures #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

record on failures #78

wants to merge 2 commits into from

Conversation

rsudarson
Copy link
Collaborator

To address - #36

@rsudarson
Copy link
Collaborator Author

@bahmutov - Please review, thanks!

@@ -38,7 +40,7 @@ const processTestResults = (processingOptions = {}) => async (results) => {
}
// if the test name includes the special movie string
// then we want to convert this particular test into a movie
if (test.title[test.title.length - 1].includes(MOVIE_SYMBOL) || test.state === 'failed') {
if (test.title[test.title.length - 1].includes(MOVIE_SYMBOL) || recordFailedTests === 'true') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this will record all tests? because you removed the failed state check

@@ -16,6 +16,8 @@ const MOVIE_REGEX = /🎥/g

const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path

const recordFailedTests = process.env.RECORD_FAILED_TESTS
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process the environment variable here to get a boolean variable. I would do something like

let recordFailedTests = false
if ('RECORD_FAILED_TESTS' in process.env) {
  recordFailedTests = process.env.RECORD_FAILED_TESTS === 'true' || process.env.RECORD_FAILED_TESTS === '1'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants