jeudi 18 avril 2019

Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths

Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.

Please update your configuration.

I found this exact question here: setupTestFrameworkScriptFile is not supported error

I renamed my jest.config.js to setUpTests.js however that did not remove the deprecated error warning.

import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })

package.json scripts

"scripts": {
  "dev": "next -p 7777",
  "build": "next build",
  "start": "next -p 7777",
  "test": "NODE_ENV=test jest --watch --no-cache",
  "test-win": "SET NODE_ENV=test&& jest --watch"
}

"@types/enzyme": "^3.1.15",
"@types/jest": "^23.3.13",
"jest": "^24.1.0"

Aucun commentaire:

Enregistrer un commentaire