Release PrestaShop 1.2.0: use hook contracts

This commit is contained in:
fatequod
2026-09-30 08:26:55 +02:00
parent 6b5e03246e
commit 599a7b9863
25 changed files with 276 additions and 62 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
const { withHookFixtures } = require('./helpers/hook-fixtures');
const test = require('node:test');
const assert = require('node:assert/strict');
@@ -13,7 +14,7 @@ const CURRENT_STATUS = '507f191e810c19729de860e3';
function dependencies(overrides = {}) {
const calls = { setOrderState: [], released: [], locks: [] };
const Core = {
const Core = withHookFixtures({
getLock: async (name, ttl) => {
calls.locks.push([name, ttl]);
return 'status-lock';
@@ -31,7 +32,7 @@ function dependencies(overrides = {}) {
},
}] }),
registerHook: async () => true,
};
});
const deps = {
Core,
Log: { info() {}, warn() {}, error() {} },