Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Assertion of the matched intents #19

@oboznyiM

Description

@oboznyiM

I think, there is a typo in the implementation of assertTopMatchedIntent() method:
async assertTopMatchedIntent( query: string, expectedIntent: string, requiredPlace = 1, queryLanguage: string )

According to the documentation, it checks if the expectedIntent is among top requiredPlace matched intents.
Here's a line from the implementation of this method (src/action-on-google-test-manager.ts):
!matchedIntents!.slice(0, requiredPlace - 1).includes(expectedIntent)
It takes a slice from 0 to requiredPlace - 1 which is top (requiredPlace - 1) matched intents.

I faced this problem while testing a phrase that can be matched only to one intent.

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