jest-cucumber icon indicating copy to clipboard operation
jest-cucumber copied to clipboard

jest-cucumber : Feature file not found () error

Open santhazh1 opened this issue 2 years ago • 2 comments

I have a feature file , named as consoleLogger.feature.

and consoleLogger.steps.js which contains the below code ,

import { defineFeature, loadFeature } from 'jest-cucumber'; const consoleLogger = require('../src/Util/consoleLogger'); const feature = loadFeature('../feature/consoleLogger.feature');

I am trying to connect feature file with step file using loadFeature but getting the below error , FAIL steps/consoleLogger.steps.js ● Test suite failed to run

Feature file not found (C:\Users\sr00015\NewWorkspace\feature\consoleLogger.feature)

folder structure image

santhazh1 avatar Jul 08 '22 12:07 santhazh1

I had the same error. You must specify the path from the root directory. Example: ./feature/consoleLogger.feature

IvaanTorres avatar Aug 10 '22 11:08 IvaanTorres

image add the option "{loadRelativePath: true}"

AnserJoe avatar Mar 23 '23 03:03 AnserJoe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 29 '24 02:03 github-actions[bot]

This issue is closed because there has been no recent activity.

github-actions[bot] avatar Apr 05 '24 02:04 github-actions[bot]