From 29f2709d260b008a8e65591313870115bf0e3fbf Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Sun, 19 Mar 2023 15:51:13 +0100 Subject: [PATCH] test: fix imports --- package.json | 1 + test/index.test.ts | 6 +++--- yarn.lock | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0400d21..d243ca2 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@types/mocha": "^10", "@types/node": "^18", "@types/rdf-js": "^4.0.1", + "@types/rdfjs__data-model": "^2.0.2", "@types/rdfjs__dataset": "^2.0.1", "@types/rdfjs__term-set": "^2.0.2", "@typescript-eslint/eslint-plugin": "^5.55.0", diff --git a/test/index.test.ts b/test/index.test.ts index d0177cf..2053bdf 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -3,9 +3,9 @@ import { expect } from 'chai' import { describe, it } from 'mocha' import { schema, sh, skos, foaf, rdf, owl } from '@tpluscode/rdf-ns-builders' import type { GraphPointer } from 'clownface' -import { literal } from '@rdfjs/data-model' +import RDF from '@rdfjs/data-model' import namespace from '@rdfjs/namespace' -import { findNodes, toSparql } from '../src' +import { findNodes, toSparql } from '../src/index.js' import { any, blankNode, namedNode } from './nodeFactory.js' const tbbt = namespace('http://example.com/') @@ -186,7 +186,7 @@ describe('clownface-shacl-path', () => { const nodes = findNodes(leonard, path) // then - expect(nodes.terms).to.deep.contain.members([literal('Amy'), literal('Amy Farrah-Fowler')]) + expect(nodes.terms).to.deep.contain.members([RDF.literal('Amy'), RDF.literal('Amy Farrah-Fowler')]) }) it('follows an alternative of two inverse paths', () => { diff --git a/yarn.lock b/yarn.lock index d53ed75..78c1722 100644 --- a/yarn.lock +++ b/yarn.lock @@ -436,6 +436,13 @@ dependencies: "@types/node" "*" +"@rdfjs/types@^1.0.1": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rdfjs/types/-/types-1.1.0.tgz#098f180b7cccb03bb416c7b4d03baaa9d480e36b" + integrity sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw== + dependencies: + "@types/node" "*" + "@tpluscode/eslint-config@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@tpluscode/eslint-config/-/eslint-config-0.4.2.tgz#7342de86806ebd77d8f0ba7271004cbaf1c26df9" @@ -560,6 +567,13 @@ dependencies: rdf-js "*" +"@types/rdfjs__data-model@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/rdfjs__data-model/-/rdfjs__data-model-2.0.2.tgz#dc54d2edcc5699ff1a5ba0301220b8ee44946e31" + integrity sha512-7apA0UMstUgjAlY13nhbsp9N6mH1EqL9GvTJqC79cbpDglH/ILjzaQZVlW/M3S/0hMHsMN/lZfgXsk8DN8YiKA== + dependencies: + "@rdfjs/types" "^1.0.1" + "@types/rdfjs__dataset@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/rdfjs__dataset/-/rdfjs__dataset-2.0.1.tgz#74ab3fb4b1b9f647a515c25d99987d5eb5bc031f"