diff --git a/test/sec/fn-date.e2e-spec.ts b/test/sec/fn-date.e2e-spec.ts index 8687af3..64d353e 100644 --- a/test/sec/fn-date.e2e-spec.ts +++ b/test/sec/fn-date.e2e-spec.ts @@ -29,23 +29,25 @@ describe('DateService', () => { afterEach(() => runner.clear()); - it('calculateWeekdays() should not have DATE_MANIPULATION', async () => { - type FnArgs = { - from: string; - to: string; - }; - const inputSample: FnArgs = { - from: '2022-11-30', - to: '2024-06-21' - }; - const fn = ({ from, to }: FnArgs) => - dateService.calculateWeekdays(from, to); - - await runner - .createScan({ - name: expect.getState().currentTestName, - tests: [TestType.DATE_MANIPULATION] - }) - .run({ inputSample, fn }); + describe('calculateWeekdays', () => { + it('should not have DATE_MANIPULATION', async () => { + type FnArgs = { + from: string; + to: string; + }; + const inputSample: FnArgs = { + from: '2022-11-30', + to: '2024-06-21' + }; + const fn = ({ from, to }: FnArgs) => + dateService.calculateWeekdays(from, to); + + await runner + .createScan({ + name: expect.getState().currentTestName, + tests: [TestType.DATE_MANIPULATION] + }) + .run({ inputSample, fn }); + }); }); }); diff --git a/test/sec/fn-file.e2e-spec.ts b/test/sec/fn-file.e2e-spec.ts index d966517..d010fbc 100644 --- a/test/sec/fn-file.e2e-spec.ts +++ b/test/sec/fn-file.e2e-spec.ts @@ -29,20 +29,22 @@ describe('FileService', () => { afterEach(() => runner.clear()); - it('fetch() should not have RFI', async () => { - type FnArgs = { - url: string; - }; - const inputSample: FnArgs = { - url: 'https://brightsec.com/robots.txt' - }; - const fn = ({ url }: FnArgs) => fileService.fetch(url); - - await runner - .createScan({ - name: expect.getState().currentTestName, - tests: [TestType.RFI] - }) - .run({ inputSample, fn }); + describe('fetch', () => { + it('should not have RFI', async () => { + type FnArgs = { + url: string; + }; + const inputSample: FnArgs = { + url: 'https://brightsec.com/robots.txt' + }; + const fn = ({ url }: FnArgs) => fileService.fetch(url); + + await runner + .createScan({ + name: expect.getState().currentTestName, + tests: [TestType.RFI] + }) + .run({ inputSample, fn }); + }); }); }); diff --git a/test/sec/fn-xml.e2e-spec.ts b/test/sec/fn-xml.e2e-spec.ts index 04e19b8..96cf415 100644 --- a/test/sec/fn-xml.e2e-spec.ts +++ b/test/sec/fn-xml.e2e-spec.ts @@ -29,15 +29,17 @@ describe('XmlService', () => { afterEach(() => runner.clear()); - it('parse() should not have XXE', async () => { - const inputSample = ''; - const fn = (data: string) => xmlService.parse(data); - - await runner - .createScan({ - name: expect.getState().currentTestName, - tests: [TestType.XXE] - }) - .run({ inputSample, fn }); + describe('parse', () => { + it('should not have XXE', async () => { + const inputSample = ''; + const fn = (data: string) => xmlService.parse(data); + + await runner + .createScan({ + name: expect.getState().currentTestName, + tests: [TestType.XXE] + }) + .run({ inputSample, fn }); + }); }); });