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

Assertion of the matched intents #19

Open
oboznyiM opened this issue Sep 19, 2021 · 0 comments
Open

Assertion of the matched intents #19

oboznyiM opened this issue Sep 19, 2021 · 0 comments

Comments

@oboznyiM
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant