Hi ,
I am using Jest ( v28 ) with webpack ( v4.46 ) to write test case via React ( v16 )
A React component is using the .bpmn extension file to preload the editor .
While writing the test case for it , JEST framework is not able to read the .bpmn file
and giving following error
({“Object.”:function(module,exports,require,__dirname,__filename,jest){<?xml version="1.0" encoding="UTF-8"?>
SyntaxError: Unexpected token ‘<’
I used the following jest config to make the JEST understand the .bpmn extension
transform: {
‘^.+\.bpmn?$’: ‘jest-raw-loader’,
‘^.+\.(ts|tsx)?$’: ‘ts-jest’,
‘^.+\.(js|jsx)?$’: ‘babel-jest’,
},
I used jest-raw-loader to resolve the above error but it is not working. Requesting the team to please help .
cc: @nikku