-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): allow parsing dot notation cli args (#9812)
parse dot notation cli args for env args passed to cypress executor to override cypress.env.json values. i.e. nx e2e project --env.API_URL=localhost:1234 will now correctly give cypress e2e args to override the cypress.env.json values ISSUES CLOSED: #9764
- Loading branch information
1 parent
4af1179
commit 74a4047
Showing
2 changed files
with
26 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { commandsObject } from 'nx/src/command-line/nx-commands'; | ||
|
||
describe('nx-commands', () => { | ||
it('should parse dot notion cli args', () => { | ||
const actual = commandsObject.parse( | ||
'nx e2e project-e2e --env.NX_API_URL=http://localhost:4200 --abc.123.xyx=false --a.b=3' | ||
); | ||
expect(actual).toEqual( | ||
expect.objectContaining({ | ||
abc: { | ||
'123': { | ||
xyx: 'false', | ||
}, | ||
}, | ||
a: { | ||
b: 3, | ||
}, | ||
env: { | ||
NX_API_URL: 'http://localhost:4200', | ||
}, | ||
}) | ||
); | ||
}); | ||
}); |
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