function resolveDataset(datasets, testcase) {
    if ("data" in testcase) {
        return testcase.data;
    }
    if (testcase.dataset===null) {
        return undefined;
    }
    if (datasets.hasOwnProperty(testcase.dataset)) {
        return datasets[testcase.dataset];
    }
    throw new Error("Unable to find dataset "+testcase.dataset+" among known datasets, are you sure the datasets directory has a file named "+testcase.dataset+".json?");
}
Based on the collection of datasets and the information provided as part of the testcase,
determine what input data to use in the case (may return undefined).

@param {Object} datasets Object mapping dataset names to JS values
@param {Object} testcase Testcase data read from testcase file
@returns {any} The input data to use when evaluating the jsonata expression