Skip to content

Live Comments for CoffeeScript #2177

Closed
Closed

Description

@Alexsey

The docs are saying that Live Comments are not available in CoffeeScript due to this issue but, actually, it has been resolved more than two years ago

Activity

  1. smcenlly commented on Aug 16, 2019

    @smcenlly
    Contributor

    Thanks for letting us know about the update. This may fix live comments in some places, but after some testing, it appears mostly broken. Take the following example:

    CoffeeScript

    ###
    COMMENT WORKS
    ###
    
    describe 'Student', ->
      it 'should report grade', ->
        student = new Student score: 75; # NO COMMENT IS OUTPUT
        expect(student.grade()### COMMENT IS IN THE WRONG PLACE ###).toBe('C')

    Compiler Output

      (function() {
        /*
        BLOCK COMMENT
        */
        describe('Student', function() {
          return it('should report grade', function() {
            var student;
            student = new Student({
              score: 75
            });
            return expect(student.grade())./* COMMENT IS IN THE WRONG PLACE */toBe('C');
          });
        });
      }).call(this);

    We will update our docs to indicate that Live Comments don't work due to CoffeeScript's comment migration behavior.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions