Skip to content

Commit

Permalink
Merge pull request #210 from palmerj3/v13.2.0
Browse files Browse the repository at this point in the history
Bump to version 13.2.0 and fix windows build
  • Loading branch information
palmerj3 authored Apr 20, 2022
2 parents 82047d1 + b4fe131 commit 48a6c13
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 382 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 13.x, 14.x, 16.x]
node-version: [12.x, 13.x, 14.x, 16.x]
jest-version: [24, 25, 26, 27]
exclude:
# jest@27 doesn't support node@13
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: lts/*
cache: yarn
- name: install
run: yarn
Expand Down
41 changes: 0 additions & 41 deletions __tests__/buildJsonResults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,45 +418,4 @@ describe('buildJsonResults', () => {

expect(jsonResults.testsuites[1].testsuite[2]['system-out']).not.toBeDefined();
});

it('should get custom testsuite properties from specified file path', () => {
const noFailingTestsReport = require('../__mocks__/no-failing-tests.json');
jest.mock(
'/path/to/properties.js',
() => {
return jest.fn(() => {
return { 'best-tester': 'Johan' };
});
},
{ virtual: true },
);

fs.existsSync.mockReturnValue(true);

const options = {
...constants.DEFAULT_OPTIONS,
testSuitePropertiesFile: 'properties.js',
testSuitePropertiesDirectory: '<rootDir>',
};

jsonResults = buildJsonResults(
noFailingTestsReport,
'/',
options,
'/path/to',
);

expect(jsonResults.testsuites[1].testsuite[1].properties).toEqual(
expect.arrayContaining([
{
property: expect.objectContaining({
_attr: expect.objectContaining({
name: 'best-tester',
value: 'Johan',
}),
}),
},
]),
);
});
});
2 changes: 1 addition & 1 deletion __tests__/lib/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const xml = require('xml');
const path = require('path');
const fs = require('fs');
const libxmljs = require('libxmljs');
const libxmljs = require('libxmljs2');

const schemaPath = path.join(__dirname, 'junit.xsd');
const schemaStr = fs.readFileSync(schemaPath);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/testResultProcessor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jest.mock('fs', () => {
});

const fs = require('fs');
const libxmljs = require('libxmljs');
const libxmljs = require('libxmljs2');
const path = require('path');

const testResultProcessor = require('../');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-junit",
"version": "13.1.0",
"version": "13.2.0",
"description": "A jest reporter that generates junit xml files",
"main": "index.js",
"repository": "https://github.com/jest-community/jest-junit",
Expand All @@ -25,7 +25,7 @@
},
"devDependencies": {
"jest": "^27.2.3",
"libxmljs": "^0.19.7",
"libxmljs2": "^0.29.0",
"slash": "^3.0.0"
}
}
Loading

0 comments on commit 48a6c13

Please sign in to comment.