Skip to content

[Bug]: @prefix not consistently set to true #117

@jeswr

Description

@jeswr

In particular for the two following tests, the first one correctly adds the '@prefix': true but the second test errors because '@prefix': true is not set.

it('should parse a globally protected string term ending in gen-delim with identical override', () => {
        return expect(parser.parse([
          {
            '@protected': true,
            'foo': 'http://example/foo#',
          },
          {
            '@protected': true,
            'foo': 'http://example/foo#',
          },
        ], { processingMode: 1.1 })).resolves.toEqual(new JsonLdContextNormalized({
          foo: {
            '@id': 'http://example/foo#',
            '@prefix': true,
            '@protected': true,
          },
        }));
      });

      it('should parse a globally protected string term ending in gen-delim', () => {
        return expect(parser.parse([
          {
            '@protected': true,
            'foo': 'http://example/foo#',
          },
        ], { processingMode: 1.1 })).resolves.toEqual(new JsonLdContextNormalized({
          foo: {
            '@id': 'http://example/foo#',
            '@prefix': true,
            '@protected': true,
          },
        }));
      });

I think this is the root cause of the the broken test I was trying to resolve in #112 (comment).

Is it necessary to have '@prefix': true set in each case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions