-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: commit generated fixtures and allow ci tests to catch any drifts
- Loading branch information
Showing
13 changed files
with
753 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,3 @@ yarn.lock | |
/public | ||
/vc-test-suite | ||
/.vscode | ||
|
||
/test/fixtures/v4/__generated__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import * as FIXTURES from "../fixtures"; | ||
|
||
const PATH_TO_GENERATED_FIXTURES = path.resolve(__dirname, "../../../test/fixtures/v4/__generated__"); | ||
|
||
describe("assert fixtures matches generated JSON fixtures", () => { | ||
for (const fixtureName of Object.keys(FIXTURES)) { | ||
const jsonFixtureFilename = fixtureName.replace(/_/g, "-").toLowerCase() + ".json"; | ||
|
||
test(`${jsonFixtureFilename} should match the one defined in fixtures.ts`, () => { | ||
const fixture = FIXTURES[fixtureName as keyof typeof FIXTURES]; | ||
const jsonFixture = fs.readFileSync(path.resolve(PATH_TO_GENERATED_FIXTURES, jsonFixtureFilename), "utf-8"); | ||
expect(fixture).toEqual(JSON.parse(jsonFixture)); | ||
}); | ||
} | ||
}); |
91 changes: 91 additions & 0 deletions
91
test/fixtures/v4/__generated__/batched-raw-documents-did.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
121 changes: 121 additions & 0 deletions
121
test/fixtures/v4/__generated__/batched-signed-wrapped-documents-did.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.