Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to version 13.2.0 and fix windows build #210

Merged
merged 6 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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