-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(jest): Convert the remaining 3D viewer unit tests to Jest (#1267)
- Loading branch information
Showing
17 changed files
with
193 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { MODEL3D_STATIC_ASSETS_VERSION } from '../../../constants'; | ||
|
||
const consoleLog = global.console.log; | ||
|
||
global.console.log = message => { | ||
// Workaround to suppress irrelevant console messages regarding schema compatibility in Box3D/AJV | ||
if (typeof message === 'string' && message.indexOf('$ref: all keywords') >= 0) { | ||
return; | ||
} | ||
|
||
consoleLog(message); | ||
}; | ||
|
||
/* eslint-disable import/no-dynamic-require */ | ||
const Box3DRuntime = require(`../../../../third-party/model3d/${MODEL3D_STATIC_ASSETS_VERSION}/box3d-runtime.min.js`); | ||
const THREE = require(`../../../../third-party/model3d/${MODEL3D_STATIC_ASSETS_VERSION}/three.min.js`); | ||
/* eslint-enable import/no-dynamic-require */ | ||
|
||
global.console.log = consoleLog; | ||
|
||
export { THREE }; | ||
export default Box3DRuntime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/lib/viewers/box3d/image360/__tests__/Image360Renderer-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.