Skip to content

Commit

Permalink
test: work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 committed Sep 30, 2023
1 parent 42f371e commit d5bdaa6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,19 @@ describe('@jnxplus/nx-gradle spring-boot smoke', () => {

execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions());

const affected = execSync(
'npx nx show projects --affected',
execSync(
`npx nx graph --affected --file=dep-graph-affected.json`,
execSyncOptions(),
);
expect(affected).not.toContain(testApp);
expect(affected).not.toContain(testApp2);
expect(affected).not.toContain(testApp3);
expect(affected).not.toContain(testApp4);
expect(affected).not.toContain(testLib);
expect(affected).not.toContain(testLib2);

const depGraphAffectedJson = await readJson(
join(smokeDirectory, 'test', 'dep-graph-affected.json'),
);
expect(depGraphAffectedJson.graph.nodes[testApp]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp2]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp3]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp4]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testLib]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testLib2]).toBeDefined();
}, 1500000);
});
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,19 @@ describe('@jnxplus/nx-maven spring-boot smoke', () => {

execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions());

const affected = execSync(
'npx nx show projects --affected',
execSync(
`npx nx graph --affected --file=dep-graph-affected.json`,
execSyncOptions(),
);
expect(affected).not.toContain(testApp);
expect(affected).not.toContain(testApp2);
expect(affected).not.toContain(testApp3);
expect(affected).not.toContain(testApp4);
expect(affected).not.toContain(testLib);
expect(affected).not.toContain(testLib2);

const depGraphAffectedJson = await readJson(
join(smokeDirectory, 'test', 'dep-graph-affected.json'),
);
expect(depGraphAffectedJson.graph.nodes[testApp]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp2]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp3]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testApp4]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testLib]).toBeDefined();
expect(depGraphAffectedJson.graph.nodes[testLib2]).toBeDefined();
}, 1500000);
});

0 comments on commit d5bdaa6

Please sign in to comment.