File size: 686 Bytes
eb67da4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
const { clean, override } = abuser(__filename);
describe('lib/unadded', () => {
let unadded;
before(() => {
clean('.');
// BUG: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
// override('async-execute', () => `remove '.gitattributes'
// FIXED:
override('../../helpers/spawn', () => `remove '.gitattributes'
add 'apps/post/index.js'
add 'new file.txt'
`);
unadded = require('.');
});
after(() => clean('.'));
it('should convert dry-run add to a file list', async() => {
const list = await unadded();
expect(list).to.deep.equal([
'.gitattributes',
'apps/post/index.js',
'new file.txt',
]);
});
});
|