Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

console.assert() missing from code hintsΒ #3655

Closed

Description

@peterflynn
  1. Type console.a

Result: "assert" is not listed in code hints

Expected: You get hints for console.log(), console.warn(), and console.error(), so assert() should be included too.

Activity

  1. petetronic commented on Apr 29, 2013

    @petetronic
    Contributor

    The built-ins are from Tern.JS defs files, with console specifically defined in browser.json.
    https://github.com/marijnh/tern/blob/master/defs/browser.json

    These appear to be based on the Gecko (Mozilla) documentation, which does not list a console.assert() method.

  2. peterflynn commented on Apr 30, 2013

    @peterflynn
    MemberAuthor

    Since console.assert() is defined in Chrome, Safari, and Firebug I wonder if it wouldn't be such a hard sell to get it added. Is there a general policy on how many browsers need to support something before it's added to Tern's default built-ins?

  3. njx commented on May 3, 2013

    @njx

    Reviewed. To @peterflynn, low priority, adding "tracking" (not creating a "tern" label yet since it's not clear whether we'll have a lot of these). Peter--I wonder if we should consider just making a pull request directly to Marijn with the addition to the browser.json file?

  4. petetronic commented on May 3, 2013

    @petetronic
    Contributor

    We can always try, doesn't seem unreasonable. I'll ask @dloverin to take a look.

  5. eztierney commented on May 16, 2013

    @eztierney
    Contributor

    What about the other console methods that are non-standard, but match between safari, chrome, and firebug? Methods like

    console.dir
    console.profile
    console.group
    etc

    Do we want hints for all the common methods?

    chrome: https://developers.google.com/chrome-developer-tools/docs/console-api#consoleassertexpression_object
    firebug: http://getfirebug.com/wiki/index.php/Console_API
    safari: https://developer.apple.com/library/safari/#documentation/AppleApplications/Conceptual/Safari_Developer_Guide/DebuggingYourWebsite/DebuggingYourWebsite.html (need to search for Console API, it's near the end)
    ie: http://msdn.microsoft.com/en-us/library/ie/hh772183(v=vs.85).aspx

    It looks like even ie10 adds 'assert'.

    Also, even if these aren't in tern, we can write .json files for whatever we want and load them into tern. It looks like they are additive, so we can just add the missing methods in, and we wouldn't have to duplicate the entire browser.json file.

  6. redmunds commented on Mar 17, 2014

    @redmunds
    Contributor

    Was assigned to tern team, so marking "Needs Review".

  7. self-assigned this
    on Apr 1, 2014
  8. ficristo commented on Feb 19, 2017

    @ficristo
    Collaborator

    I see console.assert and console.group in the hints, but not console.profile.
    I'd say this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions