You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
353 B
JavaScript

'use strict';
let detailsRegex = /^Failing row contains \(([^\)]+)\).$/;
module.exports = function getValues(detail) {
let detailsMatch = detailsRegex.exec(detail);
if (detailsMatch == null) {
throw new Error("Could not determine values for query");
}
let [_, valueList] = detailsMatch;
return valueList.split(", ");
};