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

chore(remix): e2e tests should use strings to prevent issues running commands on windows #22820

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions e2e/remix/tests/nx-remix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ describe('Remix E2E Tests', () => {
it('should check for un-escaped dollar signs in routes', async () => {
await expect(async () =>
runCLI(
`generate @nx/remix:route --project ${plugin} --path my.route.$withParams.tsx`
`generate @nx/remix:route --project ${plugin} --path="my.route.$withParams.tsx"`
)
).rejects.toThrow();

runCLI(
`generate @nx/remix:route --project ${plugin} --path my.route.\\$withParams.tsx`
`generate @nx/remix:route --project ${plugin} --path="my.route.\\$withParams.tsx"`
);

expect(() =>
Expand All @@ -133,7 +133,7 @@ describe('Remix E2E Tests', () => {

it('should pass un-escaped dollar signs in routes with skipChecks flag', async () => {
await runCommandAsync(
`someWeirdUseCase=route-segment && yarn nx generate @nx/remix:route --project ${plugin} --path my.route.$someWeirdUseCase.tsx --force`
`someWeirdUseCase=route-segment && yarn nx generate @nx/remix:route --project ${plugin} --path="my.route.$someWeirdUseCase.tsx" --force`
);

expect(() =>
Expand All @@ -146,12 +146,12 @@ describe('Remix E2E Tests', () => {
it('should check for un-escaped dollar signs in resource routes', async () => {
await expect(async () =>
runCLI(
`generate @nx/remix:resource-route --project ${plugin} --path my.route.$withParams.ts`
`generate @nx/remix:resource-route --project ${plugin} --path="my.route.$withParams.ts"`
)
).rejects.toThrow();

runCLI(
`generate @nx/remix:resource-route --project ${plugin} --path my.route.\\$withParams.ts`
`generate @nx/remix:resource-route --project ${plugin} --path="my.route.\\$withParams.ts"`
);

expect(() =>
Expand All @@ -161,7 +161,7 @@ describe('Remix E2E Tests', () => {

xit('should pass un-escaped dollar signs in resource routes with skipChecks flag', async () => {
await runCommandAsync(
`someWeirdUseCase=route-segment && yarn nx generate @nx/remix:resource-route --project ${plugin} --path my.route.$someWeirdUseCase.ts --force`
`someWeirdUseCase=route-segment && yarn nx generate @nx/remix:resource-route --project ${plugin} --path="my.route.$someWeirdUseCase.ts" --force`
);

expect(() =>
Expand Down