Release PrestaShop 1.2.0: use hook contracts
This commit is contained in:
@@ -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() {} },
|
||||
|
||||
Reference in New Issue
Block a user