Skip to content

[Improvement] - Possible enhancements or user awareness on the string matching on the body #1521

@dstamand-msft

Description

@dstamand-msft

The stdinBody.contains compare that is being done here, is misleading. If we want to capture the initialized method as per the spec, the string.contains will also glob notifications/initialized which can be problematic.

Ideas to circumvent the problem:

  1. Allow the use of regular expressions to capture the required fragment
  2. Introduce different properties to do a string.equals instead of a string.contains
  3. Keep the behavior as is, but warn the users that the comparison is a contains and that edge cases such as above can produce incorrect results. Instead instruct users to pass a fragment of the JSON rather than a string that is contained in a property value of the json from the STDIN.

There may be other ways. Happy to brainstorm.

Metadata

Metadata

Labels

needs specIssue needs specification

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions