Skip to content

Commit

Permalink
chore(remix): e2e tests should use strings to prevent issues running …
Browse files Browse the repository at this point in the history
…commands on windows (#22820)
  • Loading branch information
Coly010 authored Apr 15, 2024
1 parent f48b305 commit 5429ba4
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 5429ba4

Please sign in to comment.