* added Logout documentation * updated type and schema * updated logout component, route and inactivityRoute references * added custom Logout component into test admin instance * fixed windows path management * added dotenv usage * added check on testSuiteDir and provided more meaningful error message * fixed object destructure * updated from logout.route to logoutRoute * extracted getSanitizedLogoutRoutes method * added unit tests * updated references * updated doc * reviewed casing and added defaults * updated usage * restored workers previous value * fixed config validation * updated docs and schema * updated reference to logoutRoute and inactivityRoute * updated test ref Co-authored-by: Alberto Maghini (MSC Technology Italia) <alberto.maghini@msc.com> Co-authored-by: Alberto Maghini <alberto@newesis.com>
34 lines
801 B
JavaScript
34 lines
801 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const babelConfig = require('../babel.config');
|
|
|
|
require('@babel/register')({
|
|
...babelConfig,
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
env: {
|
|
development: {
|
|
sourceMaps: 'inline',
|
|
retainLines: true,
|
|
},
|
|
},
|
|
});
|
|
|
|
const [testSuiteDir] = process.argv.slice(2);
|
|
|
|
if (!testSuiteDir) {
|
|
console.error('ERROR: You must provide an argument for "testSuiteDir"');
|
|
process.exit(1);
|
|
}
|
|
|
|
const configPath = path.resolve(__dirname, testSuiteDir, 'config.ts');
|
|
|
|
if (!fs.existsSync(configPath)) {
|
|
console.error('ERROR: You must pass a valid directory under test/ that contains a config.ts');
|
|
process.exit(1);
|
|
}
|
|
|
|
process.env.PAYLOAD_CONFIG_PATH = configPath;
|
|
process.env.PAYLOAD_DROP_DATABASE = 'true';
|
|
|
|
require('./devServer');
|