Skip to content

Commit 8716197

Browse files
committed
test: implement basic testing for generated templates
1 parent 2bc2c0b commit 8716197

File tree

5 files changed

+2995
-12
lines changed

5 files changed

+2995
-12
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ async function init() {
279279
// Rename entry in `index.html`
280280
const indexHtmlPath = path.resolve(root, 'index.html')
281281
const indexHtmlContent = fs.readFileSync(indexHtmlPath, 'utf8')
282-
fs.writeFileSync(indexHtmlPath, indexHtmlContent.replace('src/main.js', 'src/main.ts'))
282+
fs.writeFileSync(
283+
indexHtmlPath,
284+
indexHtmlContent.replace('src/main.js', 'src/main.ts')
285+
)
283286
}
284287

285288
if (!needsTests) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"scripts": {
1919
"format": "prettier --write .",
20-
"test": "echo \"Error: no test specified\" && exit 1",
20+
"test": "node test.js",
2121
"prepublishOnly": "node snapshot.js"
2222
},
2323
"repository": {

0 commit comments

Comments
 (0)