module.exports = {
    runTests
};

function runTests(method, tests) {
    tests.forEach(test => {
        let { input, output } = test;
        if (!Array.isArray(input)) {
            input = [ input ];
        }

        expect(method.apply(null, input)).toEqual(output);
    });

}
