Skip to content

Commit

Permalink
refactor(fuzz): rename errors: inored -> expected
Browse files Browse the repository at this point in the history
  • Loading branch information
hulkoba committed Dec 18, 2023
1 parent 2f05bd5 commit 227c12c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/fuzz/readKeyArmored.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { FuzzedDataProvider } from '@jazzer.js/core';

import { readKey } from 'openpgp';

const ignored = ['Misformed armored text'];
const expected = ['Misformed armored text'];
const MAX_MESSAGE_LENGTH = 4096;

function ignoredError(error) {
return ignored.some(message => error.message.includes(message));
return expected.some(message => error.message.includes(message));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/fuzz/readKeyBinary.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { readKey } from 'openpgp';

const ignored = ['This message / key probably does not conform to a valid OpenPGP format'];
const expected = ['This message / key probably does not conform to a valid OpenPGP format'];

function ignoredError(error) {
return ignored.some(message => error.message.includes(message));
return expected.some(message => error.message.includes(message));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/fuzz/readMessageArmored.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { FuzzedDataProvider } from '@jazzer.js/core';

import { readMessage } from 'openpgp';

const ignored = ['Misformed armored text'];
const expected = ['Misformed armored text'];
const MAX_MESSAGE_LENGTH = 4096;

function ignoredError(error) {
return ignored.some(message => error.message.includes(message));
return expected.some(message => error.message.includes(message));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/fuzz/readMessageBinary.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { readMessage } from 'openpgp';

const ignored = ['This message / key probably does not conform to a valid OpenPGP format'];
const expected = ['This message / key probably does not conform to a valid OpenPGP format'];

function ignoredError(error) {
return ignored.some(message => error.message.includes(message));
return expected.some(message => error.message.includes(message));
}

/**
Expand Down

0 comments on commit 227c12c

Please sign in to comment.