Skip to content

Commit 6acc9d2

Browse files
committed
test: fix failing test
1 parent 2dd4d37 commit 6acc9d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/scanDiff.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ describe('Scan commit diff...', async () => {
249249
expect(errorMessage).to.contains('Your push has been blocked');
250250
}
251251
});
252-
it('When no diff is present, the proxy is blocked...', async () => {
252+
it('When no diff is present, the proxy allows the push (legitimate empty diff)...', async () => {
253253
const action = new Action('1', 'type', 'method', 1, 'test/repo.git');
254254
action.steps = [
255255
{
@@ -258,10 +258,10 @@ describe('Scan commit diff...', async () => {
258258
},
259259
];
260260

261-
const { error, errorMessage } = await processor.exec(null, action);
261+
const result = await processor.exec(null, action);
262+
const scanDiffStep = result.steps.find((s) => s.stepName === 'scanDiff');
262263

263-
expect(error).to.be.true;
264-
expect(errorMessage).to.contains('Your push has been blocked');
264+
expect(scanDiffStep.error).to.be.false;
265265
});
266266

267267
it('When diff is not a string, the proxy is blocked...', async () => {

0 commit comments

Comments
 (0)