Skip to content

Ignore ignoreCallsFromThisFile does not work properly v0.7.0 #99

@dmtr-kr

Description

@dmtr-kr

Ignore ignoreCallsFromThisFile does not work properly

After upgrading to version 0.7.0, my tests stopped working. It looks like the paths are not correct.

Actually the file path which executes the call ignoreCallsFromThisFile() should be ignored but it works.

What happens:

  1. quibble-wrapper.js calls ignoreCallsFromThisFile()
  2. A list of ignoredCallerFiles is created:
  • 'C\repos\test\src\quibble-wrapper.js'
  • 'file:////C:/repos/test/src/quibble-wrapper.js'
  1. Iterates through the stack and compares whether the paths match.
    If the paths of the files to be ignored in the stack match, they are discarded.

The Bug: It doesn't work because the file URLs in the stack end with a postfix (?__quibble.js=0) and the postfix is ​​missing in the ignoredCallerFiles list.

If I add the postfix to the original path/URL in the ignoredCallerFiles list:

before:

file:////C:/repos/test/src/quibble-wrapper.js

after:

file:////C:/repos/test/src/quibble-wrapper.js?__quibble.js=0

does ignoring the quibble-wrapper.js file work and the tests pass.

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