The component of the jest test introduces the picture resource to report the error.

components of the jest test introduce picture resources to report errors

introduce picture resources into the component

import defaultHeader from"@ / assets/someImg.png"

test/Mine.spec.js
Test suite failed to run

/src/assets/someImg.png: Unexpected character "" (1:0)

  > 1 | PNG


Jul.08,2021

you want to set the jest alias

module.exports = {
  moduleNameMapper: {
   
    '^@/(.*)$': '<rootDir>/src/$1',
  }
};
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3732c-2c082.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3732c-2c082.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?