nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: FHIR/sushi
Pull request #1142 (2022-09-04 11:28:45)

Correct grammar in snapshot missing message

jafeltra: @vadi2 thanks for the PR! This is a nice, simple fix.

I ran the automated checks, and it looks like this is failing the check that runs the unit tests. It looks like [this test](https://github.com/FHIR/sushi/blob/master/test/fhirtypes/StructureDefinition.test.ts#L113-L119) in `test/fhirtypes/StructureDefinition.test.ts` is failing because the new wording is not reflected in the expected text. You can run the tests by running `npm run test`, which should show this test failing. You can also run `npm run check` in order to run the equivalent checks that will be run on the PR, which includes the unit tests, a linting check, and a check for the formatting defined by prettier.

Once that test is fixed, this PR looks good to me. Our team requires two reviews on PRs, so someone else from our team will review it as well.
vadi2: @jafeltra sure, done!

I edited the file online using github.dev for convenience, I hope the tests are fine now though.

Patch:
diff --git a/src/errors/MissingSnapshotError.ts b/src/errors/MissingSnapshotError.ts
index 13c13a2..d3c1203 100644
--- a/src/errors/MissingSnapshotError.ts
+++ b/src/errors/MissingSnapshotError.ts
@@ -1,5 +1,5 @@
 export class MissingSnapshotError extends Error {
   constructor(public url: string) {
-    super(`Structure Definition ${url} is missing snapshot. Snapshot is required for import.`);
+    super(`Structure Definition ${url} is missing a snapshot. Snapshot is required for import.`);
   }
 }


Test patch:
diff --git a/test/fhirtypes/StructureDefinition.test.ts b/test/fhirtypes/StructureDefinition.test.ts
index aa42dc6..be51499 100644
--- a/test/fhirtypes/StructureDefinition.test.ts
+++ b/test/fhirtypes/StructureDefinition.test.ts
@@ -114,7 +114,7 @@ describe('StructureDefinition', () => {
       const noSnapshotJsonObservation = defs.fishForFHIR('Observation', Type.Resource);
       delete noSnapshotJsonObservation.snapshot;
       expect(() => StructureDefinition.fromJSON(noSnapshotJsonObservation)).toThrow(
-        /http:\/\/hl7.org\/fhir\/StructureDefinition\/Observation is missing snapshot/
+        /http:\/\/hl7.org\/fhir\/StructureDefinition\/Observation is missing a snapshot/
       );
     });
   });