Mock assets files

This commit is contained in:
Pig Fang 2018-08-01 22:36:12 +08:00
parent ba25161515
commit 5bccfd3d26
3 changed files with 3 additions and 4 deletions

View File

@ -91,7 +91,8 @@
"node"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/resources/assets/src/$1"
"^@/(.*)$": "<rootDir>/resources/assets/src/$1",
"\\.(png|jpg)$": "<rootDir>/resources/assets/tests/__mocks__/file.js"
},
"setupTestFrameworkScriptFile": "<rootDir>/resources/assets/tests/setup.js",
"coveragePathIgnorePatterns": [

View File

@ -0,0 +1 @@
export default '';

View File

@ -1,9 +1,6 @@
import { mount } from '@vue/test-utils';
import Previewer from '@/components/common/Previewer';
import * as mockedSkinview3d from '../../__mocks__/skinview3d';
import '../../../src/images/textures/steve.png';
jest.mock('../../../src/images/textures/steve.png', () => '');
test('initialize skinview3d', () => {
const wrapper = mount(Previewer);