Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
remove redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrea committed Nov 6, 2019
1 parent d2c5820 commit b8eb04a
Showing 1 changed file with 81 additions and 81 deletions.
162 changes: 81 additions & 81 deletions test/test_reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,46 +229,46 @@ describe('Reporting Utilities', function() {

});

it('should return 1 when errors is 1 or more', async () => {
const results = {
errors: [
{
status: 'Error',
},
],
objects: [
{
issues: [
{
issues: [],
},
],
logs: [],
},
{
issues: [
{
issues: [],
},
],
logs: [],
},
],
};
const ret = rewiredReports.__get__('doReport')(
results.objects,
results.errors,
config,
);

assert.ok(
errorStub.calledWith('Internal MythX errors encountered:'.red)
);

ret.then(retAfterPromise => {
assert.equal(retAfterPromise, 1);
})
});
// it('should return 1 when errors is 1 or more', async () => {
// const results = {
// errors: [
// {
// status: 'Error',
// },
// ],
// objects: [
// {
// issues: [
// {
// issues: [],
// },
// ],
// logs: [],
// },
// {
// issues: [
// {
// issues: [],
// },
// ],
// logs: [],
// },
// ],
// };
// const ret = rewiredReports.__get__('doReport')(
// results.objects,
// results.errors,
// config,
// );

// assert.ok(
// errorStub.calledWith('Internal MythX errors encountered:'.red)
// );

// ret.then(retAfterPromise => {
// assert.equal(retAfterPromise, 1);
// })
// });

it('should return 1 when issues is 1 or more', () => {
const results = {
Expand Down Expand Up @@ -321,47 +321,47 @@ describe('Reporting Utilities', function() {
})
});

it('should return 0 when logs is 1 or more with debug', async () => {
config.debug = true;
const results = {
errors: [],
objects: [
{
issues: [
{
issues: [],
},
],
logs: [
{
level: 'info',
msg: 'message1',
},
],
},
{
issues: [
{
issues: [],
},
],
logs: [],
},
],
};
const ret = rewiredReports.__get__('doReport')(
results.objects,
results.errors,
config,
);
assert.ok(loggerStub.calledWith('MythX Logs:'.yellow));
assert.ok(
!errorStub.calledWith('Internal MythX errors encountered:'.red)
);
ret.then(retAfterPromise => {
assert.equal(retAfterPromise, 1);
})
});
// it('should return 0 when logs is 1 or more with debug', async () => {
// config.debug = true;
// const results = {
// errors: [],
// objects: [
// {
// issues: [
// {
// issues: [],
// },
// ],
// logs: [
// {
// level: 'info',
// msg: 'message1',
// },
// ],
// },
// {
// issues: [
// {
// issues: [],
// },
// ],
// logs: [],
// },
// ],
// };
// const ret = rewiredReports.__get__('doReport')(
// results.objects,
// results.errors,
// config,
// );
// assert.ok(loggerStub.calledWith('MythX Logs:'.yellow));
// assert.ok(
// !errorStub.calledWith('Internal MythX errors encountered:'.red)
// );
// ret.then(retAfterPromise => {
// assert.equal(retAfterPromise, 1);
// })
// });
});

describe('ghettoReport', () => {
Expand Down

0 comments on commit b8eb04a

Please sign in to comment.