Skip to content

Commit

Permalink
Add test for parsing empty string in nvt tags as undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
swaterkamp committed Mar 25, 2021
1 parent e63635a commit 104fb97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gsa/src/gmp/models/__tests__/nvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('nvt Model tests', () => {
const nvt1 = Nvt.fromElement({tags: 'bv=/A:P|st=vf'});
const nvt2 = Nvt.fromElement({});
const nvt3 = Nvt.fromElement({nvt: {tags: 'bv=/A:P|st=vf'}});
const nvt4 = Nvt.fromElement({nvt: {tags: 'bv='}});
const res = {
bv: '/A:P',
st: 'vf',
Expand All @@ -74,6 +75,7 @@ describe('nvt Model tests', () => {
expect(nvt1.tags).toEqual(res);
expect(nvt2.tags).toEqual({});
expect(nvt3.tags).toEqual(res);
expect(nvt4.tags.bv).toBeUndefined();
});

test('should parse refs', () => {
Expand Down

0 comments on commit 104fb97

Please sign in to comment.