sourcemeta/alterschema

`test.is` doesn't seem to work on test.js

luiz00martins opened this issue · 0 comments

Description

It seems that the test.is() statements in test.js are failing.

Here's the complete logs:

# Subtest: (CLI) draft4 => 2020-12
    ok 1 - should be equivalent strictly
    not ok 2 - test.is is not a function
      ---
      stack: |
        Test.<anonymous> (bindings/node/test.js:220:8)
      at:
        fileName: bindings/node/test.js
        lineNumber: 220
        columnNumber: 8
        typeName: Test
        methodName: <anonymous>
        functionName: Test.<anonymous>
      type: TypeError
      tapCaught: testFunctionThrow
      source: |2
          })

          test.is(result.stderr.toString(), '')
        -------^
          test.is(result.status, 0)
          test.end()
      ...
    
    1..2
not ok 6935 - (CLI) draft4 => 2020-12 # time=550.225ms
  ---
  at:
    fileName: bindings/node/test.js
    lineNumber: 178
    columnNumber: 5
    typeName: Object
  source: |
    }

    tap.test('(CLI) draft4 => 2020-12', (test) => {
    ----^
      const tmp = fs.mkdtempSync(path.join(os.tmpdir(), packageJSON.name))
      const schema = path.join(tmp, 'schema.json')
  ...

(node:48032) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instea
d
(Use `node --trace-deprecation ...` to show where the warning was created)
1..6935
# { total: 27055, pass: 27054, fail: 1 }
# time=462517.986ms

How to Repdocude

  • Clone repo with git clone
  • Install packages with npm install
  • run node ./bindings/node/test.js

Suggested Solution

It seems that substituting to test.equal() fixes the issue.