feat(tests): support custom test to run
This commit is contained in:
parent
a4f90519d3
commit
0e79ce42ca
@ -10,7 +10,7 @@ const tempDir = jetpack.cwd("temp");
|
|||||||
const entryFilePath = tempDir.path("testsInit.js");
|
const entryFilePath = tempDir.path("testsInit.js");
|
||||||
|
|
||||||
const testsImports = testsDir
|
const testsImports = testsDir
|
||||||
.find({ matching: "*.test.js" })
|
.find({ matching: process.env.TEST ? `${process.env.TEST}.test.js` : "*.test.js" })
|
||||||
.reduce((fileContent, path) => {
|
.reduce((fileContent, path) => {
|
||||||
const normalizedPath = path.replace(/\\/g, "/");
|
const normalizedPath = path.replace(/\\/g, "/");
|
||||||
return `${fileContent}require("../tests/${normalizedPath}");\n`;
|
return `${fileContent}require("../tests/${normalizedPath}");\n`;
|
||||||
|
Loading…
Reference in New Issue
Block a user