digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
21 stars 17 forks source link

documentLoader interface should not change... #12

Closed OR13 closed 4 years ago

OR13 commented 4 years ago
const jsonld = require('jsonld');
const cborld = require('@digitalbazaar/cborld');

import { contexts, resolvedContexts } from '../__fixtures__';

it('can use jsonld.js documentLoader', async () => {
  const result = await jsonld.documentLoader(contexts.activitystreams);
  expect(result).toEqual(resolvedContexts.activitystreams);
});

it('can use cborld documentLoader', async () => {
  const result = await cborld.documentLoader(contexts.activitystreams);
  expect(result.toString()).toEqual(resolvedContexts.activitystreams.document);
});
davidlehn commented 4 years ago

Fixed in 2.0.0.