Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Add ShaderMaterial definition for unit-tests
Browse files Browse the repository at this point in the history
Summary: The missing defintions were causing unit tests to fail

Reviewed By: lustyj

Differential Revision: D5255012

fbshipit-source-id: be0fa9d
  • Loading branch information
mikearmstrong001 authored and facebook-github-bot committed Jun 15, 2017
1 parent 1f037c1 commit 2f6ad33
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ReactVR/js/Views/__tests__/BaseMesh-test.js
Expand Up @@ -36,6 +36,9 @@ jest.mock('three', () => {
return {
TextureLoader: MockTextureLoader,
Texture: MockTexture,
ShaderMaterial: jest.fn(() => {
return {dispose() {}};
}),
MeshBasicMaterial: jest.fn(() => {
return {dispose() {}};
}),
Expand Down
3 changes: 3 additions & 0 deletions ReactVR/js/Views/__tests__/BaseView-test.js
Expand Up @@ -27,6 +27,9 @@ jest
'three',
() => ({
Group: jest.fn(),
ShaderMaterial: jest.fn(() => {
return {dispose() {}};
}),
MeshBasicMaterial: jest.fn(() => {
return {dispose() {}};
}),
Expand Down
3 changes: 3 additions & 0 deletions ReactVR/js/Views/__tests__/Image-test.js
Expand Up @@ -39,6 +39,9 @@ jest
'three',
() => ({
Group: jest.fn(),
ShaderMaterial: jest.fn(() => {
return {dispose() {}};
}),
MeshBasicMaterial: jest.fn(() => {
return {dispose() {}};
}),
Expand Down
3 changes: 3 additions & 0 deletions ReactVR/js/Views/__tests__/Text-test.js
Expand Up @@ -37,6 +37,9 @@ jest
'three',
() => ({
Group: jest.fn(),
ShaderMaterial: jest.fn(() => {
return {dispose() {}};
}),
MeshBasicMaterial: jest.fn(() => {
return {dispose() {}};
}),
Expand Down
3 changes: 3 additions & 0 deletions ReactVR/js/Views/__tests__/View-test.js
Expand Up @@ -68,6 +68,9 @@ jest
'three',
() => ({
Group: jest.fn(),
ShaderMaterial: jest.fn(() => {
return {dispose() {}};
}),
MeshBasicMaterial: jest.fn(() => {
return {dispose() {}};
}),
Expand Down

0 comments on commit 2f6ad33

Please sign in to comment.