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

Fix multi-variable substitution #1040

Merged
merged 1 commit into from
Jul 2, 2023
Merged

Conversation

adrianisk
Copy link
Contributor

@adrianisk adrianisk commented Jun 27, 2023

Summary

Fixes variable substitution in launch.json debug configurations when an arg contains more than one variable

More details in #1039

Previous

/Users/foo/bar/node_modules/.bin/sst bind 'jest --testNamePattern="${jest.testNamePattern}" --config jest.config.ts --runInBand --watchAll=false "/Users/foo/bar/path/test/createOrUpdateLineageIntegration.integration.test.ts"'

Now

/Users/foo/bar/node_modules/.bin/sst bind 'jest --testNamePattern="creating an integration returns 200" --config jest.config.ts --runInBand --watchAll=false "/Users/foo/bar/path/test/createOrUpdateLineageIntegration.integration.test.ts"'

Test

I added a unit test, verified it was failing without this change, and that it passes with this change.

I also followed the eat your own dog food steps in the CONTRIBUTING readme, and verified things work in our repository with this change + changing the settings.json "jest.jestCommandLine" value to

"jest.jestCommandLine": "wrap () { NODE_OPTIONS=--experimental-vm-modules yarn sst bind \"jest --config=jest.config.ts $*\";}; wrap ",

to make sure the additional flags the plugin appends are substituted within "jest ..."

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5394139157

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 97.768%

Totals Coverage Status
Change from base Build 5370976313: -0.003%
Covered Lines: 3539
Relevant Lines: 3559

💛 - Coveralls

Copy link
Collaborator

@connectdotz connectdotz left a comment

Choose a reason for hiding this comment

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

Nice refactoring, great PR, thanks.

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.

3 participants