Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Test fail, missing module #3

Open
lusimeon opened this issue Aug 13, 2019 · 1 comment
Open

Test fail, missing module #3

lusimeon opened this issue Aug 13, 2019 · 1 comment

Comments

@lusimeon
Copy link

Hi there, seems to have an error in test file.

The resolvePathnameFromRouteName module seems to be missing since the 3.0.0 version.

This cause the following error in npm run test command:

> [email protected] test /path/to/project
> NODE_ENV=test jest --silent --detectOpenHandles --config ./__tests__/jest.config.js

 FAIL  __tests__/common.test.js
  ● Test suite failed to run

    Cannot find module '../helpers/resolvePathnameFromRouteName' from 'common.test.js'

      11 | const routes = require('../server/routes');
      12 | const assert = require('assert');
    > 13 | const resolvePathnameFromRouteName = require('../helpers/resolvePathnameFromRouteName')
         |                                      ^
      14 |
      15 | beforeAll(async () => {
      16 |   return await server.start(process.env.PORT);

      at Resolver.resolveModule (../node_modules/jest-resolve/build/index.js:230:17)
      at Object.require (common.test.js:13:38)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        7s
@chuck-durst
Copy link
Collaborator

Hi, many changes have been made to the routing system since version 3.0.0 and the tests currently in place no longer reflect the app as it is today. In fact, the test update is a todo that I haven't had time to process yet, my bad... I'll let you know when it's done!

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

2 participants