Skip to content

Commit

Permalink
chore(misc): fix e2es for cache and run (#21561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli committed Feb 2, 2024
1 parent bc6e58f commit d9b4cb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions e2e/nx-run/src/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ describe('cache', () => {

afterEach(() => cleanupProject());

// TODO(crystal, @Cammisuli): Investigate why this is failing
xit('should cache command execution', async () => {
it('should cache command execution', async () => {
const myapp1 = uniq('myapp1');
const myapp2 = uniq('myapp2');
runCLI(`generate @nx/web:app ${myapp1}`);
Expand Down Expand Up @@ -123,9 +122,11 @@ describe('cache', () => {
const originalNxJson = readFile('nx.json');
updateFile('nx.json', (c) => {
const nxJson = JSON.parse(c);
for (const key in nxJson.targetDefaults ?? {}) {
delete nxJson.targetDefaults[key].cache;
}
nxJson.targetDefaults = {
build: {
cache: false,
},
};
return JSON.stringify(nxJson, null, 2);
});

Expand Down
4 changes: 2 additions & 2 deletions e2e/nx-run/src/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,7 @@ describe('Nx Running Tests', () => {
expect(output).toContain('Nx read the output from the cache');
});

// TODO(crystal, @Cammisuli): Investigate why this is failing
xit('should read outputs', () => {
it('should read outputs', () => {
const nodeCommands = [
"const fs = require('fs')",
"fs.mkdirSync('../../tmp/exec-outputs-test', {recursive: true})",
Expand All @@ -783,6 +782,7 @@ describe('Nx Running Tests', () => {
nx: {
targets: {
build: {
cache: true,
outputs: ['{workspaceRoot}/tmp/exec-outputs-test'],
},
},
Expand Down

0 comments on commit d9b4cb2

Please sign in to comment.