Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/__tests__/SignedCode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import TestModule from "TestModule";
TestModule.someCall(24, 67);

function printEverything() {
// <Manual-Section init-code START>
// <Manual-Section START init-code>
console.log("42 is the answer!");
// <Manual-Section END>
}

function someOtherFunction() {
// <Manual-Section more-code START>
// <Manual-Section START more-code>
console.log("I don't know");
// <Manual-Section END>
}
Expand Down Expand Up @@ -73,10 +73,13 @@ describe("signedCode", () => {
expect(instance.getVersion()).toStrictEqual(368);
});

it("gets the manual sections", () => {
const instance = new SignedCode(signedTestCode(validChecksum));
expect(instance.getManualSections()).toMatchSnapshot();
});
it("gets the manual sections", () => {
const instance = new SignedCode(signedTestCode(validChecksum));
expect(instance.getManualSections()).toStrictEqual({
"init-code": { code: "\n console.log(\"42 is the answer!\");\n" },
"more-code": { code: "\n console.log(\"I don't know\");\n" },
});
});

it("resigns code", () => {
const instance = new SignedCode(signedTestCode(invalidChecksum));
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/SignedCodeBuilder-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import TestModule from "TestModule";
TestModule.someCall(24, 67);

function printEverything() {
// <Manual-Section init-code START>
// <Manual-Section START init-code>
console.log("42 is the answer!");
// <Manual-Section END>
}

function someOtherFunction() {
// <Manual-Section more-code START>
// <Manual-Section START more-code>
console.log("I don't know");
// <Manual-Section END>
}
Expand Down