Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.is doesn't seem to work on test.js #165

Open
luiz00martins opened this issue Oct 11, 2023 · 0 comments
Open

test.is doesn't seem to work on test.js #165

luiz00martins opened this issue Oct 11, 2023 · 0 comments

Comments

@luiz00martins
Copy link

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.

jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Oct 12, 2023
Fixes: #165
Signed-off-by: Juan Cruz Viotti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant