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

async tests / Cannot read property Symbol(Symbol.iterator)' of undefined #1806

Closed
dcsan opened this issue Aug 25, 2018 · 4 comments
Closed

Comments

@dcsan
Copy link

dcsan commented Aug 25, 2018

Issue description or question

image

when running simple tests I get the error above.
tests run fine from the command line with Mocha.

I am passing in the data from an async function

describe('load yaml', async function() {

  it('from file', async function() {

    let qo = {
      query: 'where is my pink pooch'
    }
    let item = new Taggable(qo)
    let checkList = await loadTestData()
    let found = await item.findTags(checkList)

Wallaby.js configuration file

module.exports = function () {

  process.env.NODE_ENV = 'test'

  return {
    name: 'NAP',

    files: [
      'classes/**/*.js',
      'models/**/*.js',
      'routes/**/*.js',
      'lib/**/*.js',
      'config/**/*', // also need JSON config settings
      // 'server.js'
    ],

    tests: [
      'test/*.js'
    ],

    env: {
      type: 'node',
      // params: {
      //   env: 'NODE_ENV=devbot'
      // }
    },
    debug: true,
    testFramework: 'mocha'

  }
}

Code editor or IDE name and version

Visual Studio Code v1.

OS name and version

OSX

@ArtemGovorov
Copy link
Member

We have created this sample with your code and config: https://github.com/ArtemGovorov/wallaby-1806, and it seems to be working as expected:

screen shot 2018-08-26 at 9 09 17 am

Could you please clone the repo to see if it's working for you, and if it is, please provide the bits we are missing to reproduce the issue.

From the error message it looks like the checkItems passed into the findTags is undefined for some reason. Try adding some console.log(checkItems) or Wallaby live comments to track why the value is not passed correctly.

@smcenlly
Copy link
Member

Closing this issue due to lack of activity. Will re-open if more information is provided.

@dcsan
Copy link
Author

dcsan commented Mar 13, 2019

is wallaby more stable now? i gave up on it back then tho it seems like a good idea in theory.

@smcenlly
Copy link
Member

"Stability" issues (especially when things are working in another testing framework) are generally caused by problems with your wallaby configuration. If you want to give Wallaby another try, if you email us, we can provide you with an extended trial license. If do so and you have problems with stability, we'd be happy to take a look at your configuration for you.

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

No branches or pull requests

3 participants