V
V
vaskadogana2020-02-12 11:53:46
Software testing
vaskadogana, 2020-02-12 11:53:46

How to teach mocha to understand relative paths in test files?

The project uses the following relative paths to import dependencies:

import Preloader                          from 'oftenUsed/Preloader.jsx'
import gasStationApi                      from 'actions/gasStationApi.js'

in the webpack config context: path.join(__dirname, '../src'),

, the folder tree is something like this

test
src
      folder
      folder
                      folder
                               componentForTest


I want to search for files relative to src ...
Google does not help, found a relative path setting to call tests, but not import

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question