feat(salix): refs #6436 #6436 remove unnecessary object.assign
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
95a23ad9fc
commit
b4afb883fc
|
@ -27,13 +27,7 @@ const default_loopback_ctx = userId => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function vnBeforeAll() {
|
function vnBeforeAll() {
|
||||||
Object.assign(beforeAll, {getCtx: default_before_all});
|
Object.assign(beforeAll, {getCtx: default_before_all, mockLoopBackContext});
|
||||||
Object.assign(beforeAll, {mockLoopBackContext});
|
|
||||||
}
|
|
||||||
function mockBeforeAll(value = default_before_all) {
|
|
||||||
const origin = beforeAll.ctx;
|
|
||||||
Object.assign(origin, value);
|
|
||||||
return origin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mockLoopBackContext = userId => {
|
const mockLoopBackContext = userId => {
|
||||||
|
@ -46,7 +40,7 @@ const mockLoopBackContext = userId => {
|
||||||
return activeCtx;
|
return activeCtx;
|
||||||
};
|
};
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mockBeforeAll, mockLoopBackContext
|
mockLoopBackContext
|
||||||
};
|
};
|
||||||
|
|
||||||
(function init() {
|
(function init() {
|
||||||
|
|
Loading…
Reference in New Issue