Skip to content

Commit

Permalink
chore(react): enable verbose logging in e2e to see ci failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Nov 11, 2024
1 parent 4cfff1d commit b5591f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e2e/react/src/react.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ describe('React Applications', () => {
`
);

runCLI(`build ${appName}`);
runCLI(`build ${appName}`, { verbose: true });

checkFilesExist(`dist/${appName}/index.html`);

if (runE2ETests()) {
// TODO(Colum): investigate why webkit is failing
const e2eResults = runCLI(`e2e ${appName}-e2e -- --project=chromium`);
const e2eResults = runCLI(`e2e ${appName}-e2e -- --project=chromium`, {
verbose: true,
});
expect(e2eResults).toContain('Successfully ran target e2e for project');
expect(await killPorts()).toBeTruthy();
}
Expand Down
2 changes: 2 additions & 0 deletions packages/rspack/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ function ensureNxRspackExecutionContext(ctx: NxRspackExecutionContext): void {
const configurationName = process.env.NX_TASK_TARGET_CONFIGURATION;
const projectGraph = readCachedProjectGraph();
const projectNode = projectGraph.nodes[projectName];
console.log('>>>DBG>>>', projectNode, projectName, projectNode.data.root);
ctx.options ??= {
root: workspaceRoot,
projectRoot: projectNode.data.root,
sourceRoot: projectNode.data.sourceRoot ?? projectNode.data.root,
// These aren't actually needed since NxRspackPlugin and withNx both support them being undefined.
assets: undefined,
outputFileName: undefined,
outputPath: undefined,
rspackConfig: undefined,
};
ctx.context ??= {
Expand Down

0 comments on commit b5591f5

Please sign in to comment.