Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this.handlers[[satoriResult.match,this.alexa.handler.state].join(...)].call is not a function #5

Open
hideokamoto opened this issue Jul 1, 2018 · 2 comments

Comments

@hideokamoto
Copy link

I've try to use the library to test my Alexa skill, but I saw some error.
repo: https://github.com/hideokamoto/alexa-test-practice/tree/kuchimane

$ node -v
v10.1.0

Reproduce

$ git clone [email protected]:hideokamoto/alexa-test-practice.git
$ cd alexa-test-practice/lambda/custom
$ npm i
$ npm test

  4 passing (16ms)
  1 failing

  1) e2e
       greet:
     TypeError: this.handlers[[satoriResult.match,this.alexa.handler.state].join(...)].call is not a function
      at Kuchimane.listen (node_modules/kuchimane/dist/bundle.js:145:83)
      at /Users/dc_hideokamoto/develop/node/alexa/unit-test/lambda/custom/node_modules/kuchimane/dist/bundle.js:150:58
      at Context.it (tests/e2e/index.test.js:15:7)

test code

const kuchimane = require('kuchimane')
const Kuchimane = kuchimane.default
const assert = require('power-assert')
const LaunchRequest = require('../../handlers/LaunchRequest')
const HelloWorldIntent = require('../../handlers/HelloWorldIntent')

const kuchimaneRunner = Kuchimane.runner({ LaunchRequest, HelloWorldIntent }, `${__dirname}/kuchimane_config.json`)

describe('e2e', () => {
  it('greet', () => {
    return kuchimaneRunner.talkCheck('Open greeter', (replyMessage) => {
      console.log(replyMessage)
      assert.deepEqual(replyMessage, 'Welocome to GreetingBot')
    })()
      .then(kuchimaneRunner.talkCheck('Hello', (replyMessage) => {
        assert.deepEqual(replyMessage, 'Hello! Good day')
      }))
  })
})
@hideokamoto
Copy link
Author

probably ...
Is the lib only supports alexa-sdk ?
I'm using ask-sdk and I saw the issue.

@kikaineko
Copy link
Member

Thank you for your issue.

We follow the ask-sdk v1, but the last version of the ask-sdk is two.
They are completely different, you know.
Now we do not follow v2 yet, sorry.

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

No branches or pull requests

2 participants