mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 19:27:34 +00:00
Merge pull request #17473 from strapi/chore/test-setup
This commit is contained in:
commit
27098aad74
@ -25,7 +25,7 @@ const cleanTestApp = (appPath) => {
|
||||
* @param {string} options.appPath - Name of the app that will be created (also the name of the folder)
|
||||
* @param {database} options.database - Arguments to create the testApp with the provided database params
|
||||
*/
|
||||
const generateTestApp = async ({ appPath, database, template }) => {
|
||||
const generateTestApp = async ({ appPath, database, template, link = false }) => {
|
||||
const scope = {
|
||||
database,
|
||||
rootPath: path.resolve(appPath),
|
||||
@ -54,7 +54,9 @@ const generateTestApp = async ({ appPath, database, template }) => {
|
||||
};
|
||||
|
||||
await generateNew(scope);
|
||||
if (link) {
|
||||
await linkPackages(appPath);
|
||||
}
|
||||
};
|
||||
|
||||
const linkPackages = async (appPath) => {
|
||||
|
@ -107,6 +107,7 @@ yargs
|
||||
useNullAsDefault: true,
|
||||
},
|
||||
template: path.join(cwd, 'e2e', 'app-template'),
|
||||
link: true,
|
||||
});
|
||||
/**
|
||||
* Because we're running multiple test apps at the same time
|
||||
|
Loading…
x
Reference in New Issue
Block a user