You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
596 B
15 lines
596 B
import { namedNode, blankNode, literal, defaultGraph } from "@ldo/rdf-utils";
|
|
import { nodeToString } from "../src/index.js";
|
|
|
|
describe("nodeToString", () => {
|
|
it("returns all the correct values for nodeToString", () => {
|
|
expect(nodeToString(namedNode("http://example.com"))).toBe(
|
|
"namedNode(http://example.com)",
|
|
);
|
|
expect(nodeToString(blankNode("_b1"))).toBe("blankNode(_b1)");
|
|
expect(nodeToString(literal("Hello"))).toBe(
|
|
"literal(Hello,http://www.w3.org/2001/XMLSchema#string)",
|
|
);
|
|
expect(nodeToString(defaultGraph())).toBe("defaultGraph()");
|
|
});
|
|
});
|
|
|