Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

import image in the project but failed in the unit testing #542

Open
LiKang6688 opened this issue Feb 19, 2021 · 1 comment
Open

import image in the project but failed in the unit testing #542

LiKang6688 opened this issue Feb 19, 2021 · 1 comment

Comments

@LiKang6688
Copy link

LiKang6688 commented Feb 19, 2021

Description

in a react project, do the unit testing, but failed when I import an image in the project.

Steps to Reproduce

  1. import a image in a project
    import cellLocked from '../../image/NR_Locked.png'; in a jsx file, such as selections.jsx
  2. import that jsx file in a .spec.jsx
    import * as withSelections from '../selections';
Actual behavior

Screenshot 2021-02-19 at 16 20 35

Environment

"@after-work.js/aw": "6.0.14",
"react": "^17.0.1",

Operating system
[ ] Windows
[x ] OSX
[ ] Linux

Versions

  • Node.js: v15.6.0
  • Webdriver:
  • Operating system: MacOS 10.15.7
  • [Other relevant versions]
@LiKang6688 LiKang6688 changed the title .spec.jsx import image in the project but failed in the unit testing Feb 19, 2021
@LiKang6688
Copy link
Author

in @after-work.js/example-react, import cellLocked from "./image/NR_Locked.png"; in button-hook.jsx
then npx aw -c aw.config.js --scope @after-work.js/example-react.
it will get a same error.
Screenshot 2021-02-21 at 23 39 27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant