Skip to content

Fatal error: test.titlePath is not a function #3090

@cssagogo

Description

@cssagogo

Prerequisites

  • Checked that your issue isn't already filed by cross referencing issues with the common mistake label
  • Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
  • 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
  • Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with:
    node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend avoiding the use of globally installed Mocha.

Description

I have a new project I'm putting together and I'm running 2 very simple unit tests. The test run and the broken test shows as being broken, but it looks like something fails before it can tell me what about it is failing. This is what the output says:

Running "mocha:test2" (mocha) task
Testing: test/index.html

  unitTest.init()
    1) Sample Unit test 1

  unitTest.pdf().init()
    ✓ Sample Unit test 2

  1 passing (1ms)
  1 failing

Fatal error: test.titlePath is not a function

Process finished with exit code 3

I'm running Node v9.0.0 and NPM 5.5.1 on a mac running Sierra.

Steps to Reproduce

  1. This is the repo I'm working on: https://github.com/cssagogo/pikadeck
  2. Run the test_js grunt task.

Expected behavior: One test pass and one fail with a description of how it failed in the terminal.

Actual behavior: Tests show pass/fail, but hits a fatal error before printing out what was wrong.

Reproduces how often: Always

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting for authorwaiting on response from OP or other posters - more information needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions