Skip to content

Commit

Permalink
Remove custom properties file path test
Browse files Browse the repository at this point in the history
  • Loading branch information
palmerj3 committed Apr 20, 2022
1 parent 2c8f38e commit b4fe131
Showing 1 changed file with 0 additions and 41 deletions.
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',
}),
}),
},
]),
);
});
});

0 comments on commit b4fe131

Please sign in to comment.