/* eslint-disable max-lines-per-function */
const {expect} = require('chai');

const expectedResult = require('./expected-result');
const {DUMMY_FOLDER} = require('./constants');

const mapFolder = require('../index');

describe('mapFolder', () => {
	it('is a function', () => {
		expect(mapFolder).to.be.a('function');
	});

	it('maps a given folder to a JSON', async () => {
		let res;
		try {
			res = await mapFolder(`./test/${DUMMY_FOLDER}`)//, (err, result) => {
		}
		catch (ex) {
			console.log(ex.toString());
			return expect(false).to.be.true;
		}

		return expect(res).to.deep.equal(expectedResult);
	});
});

@@ -381,16 +381,17 @@
 et res;%0A
+%0A
 %09%09try %7B%0A
@@ -444,30 +444,9 @@
 R%7D%60)
-//, (err, result) =%3E %7B
+;
 %0A%09%09%7D
@@ -468,36 +468,73 @@
 %0A%09%09%09
-console.log(ex.toString()
+/* eslint-disable-next-line no-console */%0A%09%09%09console.error(ex
 );%0A
+%0A
 %09%09%09r

fix test lint issues