websri/test/integrity-metadata/to-string.js

14 lines
418 B
JavaScript

import assert from "node:assert/strict";
import { test } from "node:test";
import { IntegrityMetadata } from "../../dist/index.js";
test("toString() can be used", function () {
const integrityMetadata = new IntegrityMetadata(
"sha256-MV9b23bQeMQ7isAGTkoBZGErH853yGk0W/yUx1iU7dM=",
);
assert.strictEqual(
integrityMetadata.toString(),
"sha256-MV9b23bQeMQ7isAGTkoBZGErH853yGk0W/yUx1iU7dM=",
);
});