Skip to content

Commit 7959b7b

Browse files
fix: prettier
1 parent ba4efe2 commit 7959b7b

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@
156156
"test/sam-alt",
157157
"test/terraform-basic"
158158
]
159-
}
159+
}

prepareForTest.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { readFile, writeFile } from 'fs/promises';
22
import { argv } from 'process';
33

4+
/**
5+
* Prepare the package.json file for testing.
6+
* Remove everything that is not needed for testing.
7+
* @param {*} testCase
8+
*/
49
async function modifyPackageJson(testCase) {
510
const filePath = 'package.json';
611

@@ -11,18 +16,17 @@ async function modifyPackageJson(testCase) {
1116
delete packageJson.scripts;
1217
delete packageJson.devDependencies;
1318

14-
// Replace workspaces node with specified values
19+
// Replace workspaces node with the test and the test case workspaces
20+
// With this all the necessary npm packages will be installed
1521
packageJson.workspaces = ['test', `test/${testCase}`];
1622

17-
// Write the modified package.json back to the file
1823
await writeFile(filePath, JSON.stringify(packageJson, null, 2), 'utf-8');
1924
console.log(
2025
`Modified ${filePath} successfully!`,
2126
JSON.stringify(packageJson, null, 2),
2227
);
2328
}
2429

25-
// Run the function with the provided file path and argument
2630
const [testCase] = argv.slice(1);
2731
if (!testCase) {
2832
console.error('Usage: node prepareForTest.js <workspace-arg>');

test/osls-esbuild-cjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
"dependencies": {
2121
"@aws-sdk/client-sts": "^3.577.0"
2222
}
23-
}
23+
}

test/osls-esbuild-esm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
"@tsconfig/node20": "^20.1.4",
2222
"@aws-sdk/client-sts": "^3.577.0"
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)