Skip to content

Commit 3fc63a1

Browse files
committed
fix: jest
1 parent 769686c commit 3fc63a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/jest-global-setup.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ export default async function globalSetup(globalConfig) {
99
cwd: 'tests/docker/',
1010
commandOptions: [['--pull', 'missing']],
1111
});
12-
await compose.run('odoo', ['--stop-after-init', '-d', 'postgres', '-r', 'odoo', '-w', 'odoo', '-i', 'base,bus,barcodes,mail', '--with-demo'], {
12+
const odoo_ver = process.env.ODOO_VERSION;
13+
const odoo_major = Number(odoo_ver.split('.', 1));
14+
const odoo_cli_params = ['--stop-after-init', '-d', 'postgres', '-r', 'odoo', '-w', 'odoo', '-i', 'base,bus,barcodes,mail'];
15+
if (odoo_major >= 19) {
16+
odoo_cli_params.push('--with-demo');
17+
}
18+
await compose.run('odoo', odoo_cli_params, {
1319
cwd: 'tests/docker/',
1420
commandOptions: [['--rm']],
1521
});

0 commit comments

Comments
 (0)