Skip to content

Commit

Permalink
updating code
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Nov 13, 2024
1 parent e0bf1b3 commit 76d6c4a
Show file tree
Hide file tree
Showing 8 changed files with 4,049 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function parseXml(options, xml){
if(options.testType === 'trx' && json.testsuites[0].testsuite[0].testcase.length !== 0){
json = parseTrx(options, json);
}

//console.log(_.sumBy(json.testsuites[0].testsuite, function(suite) { return Number(suite.tests); }));
return json.testsuites[0];
}

Expand Down
39 changes: 39 additions & 0 deletions tests/converter.nunit.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const fs = require("fs");

const test = require('@jest/globals').test;
const beforeAll = require('@jest/globals').beforeAll;
const afterAll = require('@jest/globals').afterAll;
const describe = require('@jest/globals').describe;

const converter = require('../src/converter');
const setup = require('./setup');

describe("NUnit converter tests", () => {

beforeAll(() => {
setup.removeTempDir();
});

// afterAll(() => {
// setup.removeTempDir();
// });

test('convert nunit-sample.xml', async() => {
let options = setup.createOptions('nunit-sample.xml', 'nunit')
await converter(options);
setup.compare(options);
});

test('convert nunit-short.xml', async() => {
let options = setup.createOptions('nunit-short.xml', 'nunit')
await converter(options);
setup.compare(options);
});

test('convert nunit-mudblazor.xml', async() => {
let options = setup.createOptions('nunit-mudblazor.xml', 'nunit')
await converter(options);
setup.compare(options);
});

});
Loading

0 comments on commit 76d6c4a

Please sign in to comment.