Skip to content

Commit

Permalink
fix cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrArnoldPalmer committed Mar 30, 2023
1 parent 6681eb1 commit 85d828f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/@aws-cdk/remodel/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
rewriteDepVersions,
rewriteSourceFiles,
replaceInFiles,
rewriteSourceFile,
} from './util';


Expand Down Expand Up @@ -629,6 +630,19 @@ async function reformatCliPackage(dir: string) {

return lines.join('\n');
});

// Use cloud-assembly-schema from aws-cdk-lib in test so it matches correctly
await rewriteSourceFile(
path.join(dir, 'test', 'api', 'exec.test.ts'),
async (fileContent: string) => {
const lines = fileContent.split('\n')
.map((line) => {
return line.replace('@aws-cdk/cloud-assembly-schema', 'aws-cdk-lib/cloud-assembly-schema');
});

return lines.join('\n');
},
);
}

async function reformatIntegPackage(dir: string) {
Expand Down

0 comments on commit 85d828f

Please sign in to comment.