Coder Social home page Coder Social logo

t.assert is not a function about node HOT 5 CLOSED

Quramy avatar Quramy commented on July 26, 2024
t.assert is not a function

from node.

Comments (5)

climba03003 avatar climba03003 commented on July 26, 2024 1

I believe it means the functions inside assert is exposed instead of mirroring the whole assert.

from node.

cjihrig avatar cjihrig commented on July 26, 2024 1

I can confirm that it was not my plan for the t.assert object to be the assert() function. Whether that is something we want to support or not - I don't have an opinion either way, as long as it is implemented in a way that the t.assert function could be changed in the future programmatically. I would still like to add an API for decoupling t.assert from the assert module (snapshot tests were the proof of concept for that).

from node.

Quramy avatar Quramy commented on July 26, 2024 1

@cjihrig

I can confirm that it was not my plan for the t.assert object to be the assert() function.

Thanks for your answer !

from node.

Quramy avatar Quramy commented on July 26, 2024

If you are not intentionally exposing t.assert(), you may close this issue.

from node.

RedYetiDev avatar RedYetiDev commented on July 26, 2024

An object containing assertion methods bound to context. The top-level functions from the node:assert module are exposed here for the purpose of creating test plans.

t.assert isn't a function, but an object, try logging it in the console to see what it can do

(As previously stated by @climba03003)

from node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.