@@ -90,7 +90,7 @@ describe("getTemplate", () => {
90
90
) ;
91
91
} ) ;
92
92
it ( "should return the provided template" , async ( ) => {
93
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
93
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
94
94
assert . equal ( template . name , "mocha-ethers" ) ;
95
95
} ) ;
96
96
} ) ;
@@ -284,7 +284,7 @@ describe("copyProjectFiles", () => {
284
284
285
285
describe ( "when force is true" , ( ) => {
286
286
it ( "should copy the template files to the workspace and overwrite existing files" , async ( ) => {
287
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
287
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
288
288
// Create template files with "some content" in the workspace
289
289
const workspaceFiles = template . files . map (
290
290
relativeTemplateToWorkspacePath ,
@@ -303,7 +303,7 @@ describe("copyProjectFiles", () => {
303
303
}
304
304
} ) ;
305
305
it ( "should copy the .gitignore file correctly" , async ( ) => {
306
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
306
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
307
307
// Copy the template files to the workspace
308
308
await copyProjectFiles ( process . cwd ( ) , template , true ) ;
309
309
// Check that the .gitignore exists but gitignore does not
@@ -319,7 +319,7 @@ describe("copyProjectFiles", () => {
319
319
} ) ;
320
320
describe ( "when force is false" , ( ) => {
321
321
it ( "should copy the template files to the workspace and NOT overwrite existing files" , async ( ) => {
322
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
322
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
323
323
// Create template files with "some content" in the workspace
324
324
const workspaceFiles = template . files . map (
325
325
relativeTemplateToWorkspacePath ,
@@ -338,7 +338,7 @@ describe("copyProjectFiles", () => {
338
338
}
339
339
} ) ;
340
340
it ( "should copy the .gitignore file correctly" , async ( ) => {
341
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
341
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
342
342
// Copy the template files to the workspace
343
343
await copyProjectFiles ( process . cwd ( ) , template , false ) ;
344
344
// Check that the .gitignore exists but gitignore does not
@@ -396,7 +396,7 @@ describe("installProjectDependencies", async () => {
396
396
}
397
397
398
398
it ( "should not install any template dependencies if the user opts-out of the installation" , async ( ) => {
399
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
399
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
400
400
await writeUtf8File ( "package.json" , JSON . stringify ( { type : "module" } ) ) ;
401
401
await installProjectDependencies ( process . cwd ( ) , template , false , false ) ;
402
402
assert . ok ( ! ( await exists ( "node_modules" ) ) , "node_modules should not exist" ) ;
@@ -412,7 +412,7 @@ describe("installProjectDependencies", async () => {
412
412
process . env . GITHUB_HEAD_REF ?. startsWith ( "changeset-release/" ) ,
413
413
} ,
414
414
async ( ) => {
415
- const template = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
415
+ const [ template ] = await getTemplate ( "hardhat-3" , "mocha-ethers" ) ;
416
416
await writeUtf8File (
417
417
"package.json" ,
418
418
JSON . stringify ( {
0 commit comments