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.
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.