Skip to content

Commit 60089cc

Browse files
authored
chore(expo): run export before e2e to mitigate timeout (#33414)
CI and nightlies can flake out during expo test if cypress or playwright times out waiting for webserver. This makes is to the `export` that powers `static-serve` is run before running e2e. This is not usually a problem in new workspaces with inference, but this legacy test uses executors so continuous task dependency isn't set up.
1 parent a0a3289 commit 60089cc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

e2e/expo/src/expo-legacy.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ describe('@nx/expo (legacy)', () => {
4545
runCLI(
4646
`generate @nx/expo:library libs/${libName} --buildable --publishable --importPath=${proj}/${libName} --unitTestRunner=jest --linter=eslint`
4747
);
48+
49+
// Build first to speed up static-serve
50+
runCLI(`export ${appName}`);
4851
});
4952
afterAll(() => {
5053
process.env.NX_ADD_PLUGINS = originalEnv;
@@ -283,6 +286,10 @@ describe('@nx/expo (legacy)', () => {
283286
runCLI(
284287
`generate @nx/expo:application ${appName2} --e2eTestRunner=playwright --no-interactive --unitTestRunner=jest --linter=eslint`
285288
);
289+
290+
// Build first to speed up static-serve
291+
runCLI(`export ${appName2}`);
292+
286293
if (runE2ETests()) {
287294
const results = runCLI(`e2e ${appName2}-e2e`, { verbose: true });
288295
expect(results).toContain('Successfully ran target e2e');

0 commit comments

Comments
 (0)