Files
payloadcms/test/dev/index.js
Elliot DeNolf 90ba15f9bd feat: testing refactor (e2e/int) (#748)
Co-authored-by: James <james@trbl.design>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2022-07-13 11:00:10 -07:00

22 lines
512 B
JavaScript

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 [testConfigDir] = process.argv.slice(2);
const configPath = path.resolve(__dirname, '../', testConfigDir, 'config.ts');
process.env.PAYLOAD_CONFIG_PATH = configPath;
process.env.PAYLOAD_DROP_DATABASE = 'true';
require('./server');