Skip to content

Commit

Permalink
test: improve JS tests to test profile with default args
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed May 30, 2024
1 parent c3e30fa commit 44bc7e6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions js/tests/nanopub.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,21 @@ describe('Tests for the @nanopub/sign npm package', () => {
test('publish nanopub', async () => {
const profile = new NpProfile(privKey, orcid, "Your Name");
const np = await new Nanopub(unsignedRdf).publish(profile);

// console.log("Published Nanopub:", np.info());
expect(np.info().published).toBeDefined();
console.log({ profile, np });
console.log({ profile, nanopub: np.info() });
// console.log({ profile, np });
// console.log({ profile, nanopub: np.info() });
// console.log({ profile, nanopub: nanopub.info(), signed: signed.info() });
// expect(np.info().trusty_hash).toBe("RAE9traVUygMTJ-k8E1_pVNy3gtf7uUvtHJtPeU64WpA4");
});

test('publish nanopub default profile', async () => {
const profile = new NpProfile(privKey);
const np = await new Nanopub(unsignedRdf).publish(profile);
expect(np.info().published).toBeDefined();
// console.log({ profile, np });
// console.log({ profile, nanopub: np.info() });
});

test('fetch nanopub', async () => {
const npUri = "https://w3id.org/np/RAltRkGOtHoj5LcBJZ62AMVOAVc0hnxt45LMaCXgxJ4fw";
const np = await Nanopub.fetch(npUri);
Expand Down

0 comments on commit 44bc7e6

Please sign in to comment.