|
1 | | -import {JsonLdContextNormalized} from "jsonld-context-parser"; |
| 1 | +import {JsonLdContextNormalized, ContextParser} from "jsonld-context-parser"; |
2 | 2 | import {ParsingContext} from "../lib/ParsingContext"; |
3 | 3 | import {ParsingContextMocked} from "../mocks/ParsingContextMocked"; |
4 | 4 |
|
@@ -607,22 +607,20 @@ describe('ParsingContext', () => { |
607 | 607 | describe('for type-scoped and property-scoped contexts', () => { |
608 | 608 |
|
609 | 609 | beforeEach(() => { |
610 | | - parsingContext.contextTree.setContext(['', 'a'], Promise.resolve(new JsonLdContextNormalized({ |
611 | | - '@__propagateFallback': { fallback: true }, |
612 | | - '@propagate': false, |
| 610 | + const contextParser = new ContextParser(); |
| 611 | + parsingContext.contextTree.setContext(['', 'a'], contextParser.parse({ |
613 | 612 | '@vocab': 'http://bla.org/', |
614 | 613 | 'bar': { |
615 | 614 | '@context': { |
616 | 615 | baz: { '@type': '@vocab' }, |
617 | 616 | }, |
618 | 617 | }, |
619 | | - }))); |
| 618 | + })); |
620 | 619 | }); |
621 | 620 |
|
622 | 621 | it('should consider the applicable property-scoped context', async () => { |
623 | 622 | return expect(await parsingContext.getContext(['', 'a', 'bar'], 0)) |
624 | 623 | .toEqual(new JsonLdContextNormalized({ |
625 | | - '@__propagateFallback': { fallback: true }, |
626 | 624 | '@vocab': 'http://bla.org/', |
627 | 625 | 'bar': { '@id': 'http://bla.org/bar' }, |
628 | 626 | 'baz': { '@type': '@vocab', '@id': 'http://bla.org/baz' }, |
|
0 commit comments