joachimvh / SPARQLAlgebra.js

SPARQL to SPARQL algebra converter
20 stars 9 forks source link

Test Cases Failing When Running Locally #121

Open keiji-numata opened 2 weeks ago

keiji-numata commented 2 weeks ago

ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions. ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating PASS test/recurse-test.ts (5.497 s) PASS test/sparql-test.ts (5.762 s) FAIL test/algebra-test.ts (6.324 s) ● Algebra output › test/algebra/dawg-syntax/lit/syntax-lit-09

expect(received).toEqual(expected) // deep equality

- Expected  - 3
+ Received  + 3

@@ -10,13 +10,13 @@
            "datatype": Object {
              "termType": "NamedNode",
              "value": "http://www.w3.org/2001/XMLSchema#string",
            },
            "termType": "Literal",
-           "value": "Long
- \"\"
- Literal
+           "value": "Long
+ \"\"
+ Literal
  ",
          },
          "predicate": Object {
            "termType": "NamedNode",
            "value": "http://example.org/#p",

  42 |             let algebra = LibUtil.objectify(translate(query, { quads: name.endsWith('(quads)'), blankToVariable, sparqlStar: testName.includes('sparqlstar') }));
  43 |             let expected = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
> 44 |             expect(canon.canonicalizeQuery(algebra, blankToVariable)).toEqual(canon.canonicalizeQuery(expected, blankToVariable));
     |                                                                       ^
  45 |         });
  46 |     }
  47 | }

  at Object.<anonymous> (test/algebra-test.ts:44:71)

● Algebra output › test/algebra/dawg-syntax/lit/syntax-lit-10

expect(received).toEqual(expected) // deep equality

- Expected  - 3
+ Received  + 3

@@ -10,13 +10,13 @@
            "datatype": Object {
              "termType": "NamedNode",
              "value": "http://www.w3.org/2001/XMLSchema#string",
            },
            "termType": "Literal",
-           "value": "Long
- '' \"\"\"
- Literal
+           "value": "Long
+ '' \"\"\"
+ Literal
  ",
          },
          "predicate": Object {
            "termType": "NamedNode",
            "value": "http://example.org/#p",

  42 |             let algebra = LibUtil.objectify(translate(query, { quads: name.endsWith('(quads)'), blankToVariable, sparqlStar: testName.includes('sparqlstar') }));
  43 |             let expected = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
> 44 |             expect(canon.canonicalizeQuery(algebra, blankToVariable)).toEqual(canon.canonicalizeQuery(expected, blankToVariable));
     |                                                                       ^
  45 |         });
  46 |     }
  47 | }

  at Object.<anonymous> (test/algebra-test.ts:44:71)

● Algebra output › test/algebra-blank-to-var/dawg-syntax/lit/syntax-lit-09 (no blanks)

expect(received).toEqual(expected) // deep equality

- Expected  - 3
+ Received  + 3

@@ -10,13 +10,13 @@
            "datatype": Object {
              "termType": "NamedNode",
              "value": "http://www.w3.org/2001/XMLSchema#string",
            },
            "termType": "Literal",
-           "value": "Long
- \"\"
- Literal
+           "value": "Long
+ \"\"
+ Literal
  ",
          },
          "predicate": Object {
            "termType": "NamedNode",
            "value": "http://example.org/#p",

  42 |             let algebra = LibUtil.objectify(translate(query, { quads: name.endsWith('(quads)'), blankToVariable, sparqlStar: testName.includes('sparqlstar') }));
  43 |             let expected = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
> 44 |             expect(canon.canonicalizeQuery(algebra, blankToVariable)).toEqual(canon.canonicalizeQuery(expected, blankToVariable));
     |                                                                       ^
  45 |         });
  46 |     }
  47 | }

  at Object.<anonymous> (test/algebra-test.ts:44:71)

● Algebra output › test/algebra-blank-to-var/dawg-syntax/lit/syntax-lit-10 (no blanks)

expect(received).toEqual(expected) // deep equality

- Expected  - 3
+ Received  + 3

@@ -10,13 +10,13 @@
            "datatype": Object {
              "termType": "NamedNode",
              "value": "http://www.w3.org/2001/XMLSchema#string",
            },
            "termType": "Literal",
-           "value": "Long
- '' \"\"\"
- Literal
+           "value": "Long
+ '' \"\"\"
+ Literal
  ",
          },
          "predicate": Object {
            "termType": "NamedNode",
            "value": "http://example.org/#p",

  42 |             let algebra = LibUtil.objectify(translate(query, { quads: name.endsWith('(quads)'), blankToVariable, sparqlStar: testName.includes('sparqlstar') }));
  43 |             let expected = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
> 44 |             expect(canon.canonicalizeQuery(algebra, blankToVariable)).toEqual(canon.canonicalizeQuery(expected, blankToVariable));
     |                                                                       ^
  45 |         });
  46 |     }
  47 | }

  at Object.<anonymous> (test/algebra-test.ts:44:71)
-------------------------- --------- ---------- --------- --------- ----------------------------------------------------------------------------------------------- File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 93.41 89.48 97.33 93.71
SPARQLAlgebraTest.js 100 100 50 100
index.ts 100 100 50 100
SPARQLAlgebraTest.js/lib 93.35 89.48 97.75 93.68
algebra.ts 100 100 100 100
factory.ts 97.87 90.47 100 97.87 90,138
sparql.ts 96.78 94.11 100 96.7 94,113,128,145,498-500,592,692,818,837,918,961
sparqlAlgebra.ts 94.62 91.4 100 95.28 93,160,238,321,353,405,429,439,454,485,493,505-511,535-536,567,802,828,834,878
util.ts 84.66 78.8 85.71 85.04 87,91,131,133,190-191,196-201,220-221,245,261-265,288-306,343,349,494,499,526,529,551-572,579
-------------------------- --------- ---------- --------- --------- -----------------------------------------------------------------------------------------------

Test Suites: 1 failed, 2 passed, 3 total Tests: 4 failed, 1172 passed, 1176 total Snapshots: 0 total Time: 7.312 s Ran all test suites.

joachimvh commented 2 weeks ago

Which version of node are you using?