Skip to content

Commit

Permalink
log server response in screenshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Büßemeyer authored and Michael Büßemeyer committed Dec 17, 2024
1 parent 8b3102e commit b3d194e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,18 @@ test.before("Retrieve dataset ids", async () => {
const options = getDefaultRequestOptions(URL);
const url = `${URL}/api/datasets/disambiguate/sample_organization/${datasetName}/toId`;
const response = await fetch(url, options);
const { id } = await response.json();
const text = await response.text();
console.error(`Dataset ID for ${datasetName}: ${text}`);
const { id } = JSON.parse(text);
console.error(`Dataset ID for ${datasetName}: ${id}`);
datasetNameToId[datasetName] = id;
return true;
},
() => {},
);
}
});
test("Dataset IDs were retrieved successfully", (t) => {
test.serial("Dataset IDs were retrieved successfully", (t) => {
for (const datasetName of datasetNames) {
t.truthy(datasetNameToId[datasetName], `Dataset ID not found for "${datasetName}"`);
}
Expand Down

0 comments on commit b3d194e

Please sign in to comment.