mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
cd7e644694
* Update logo in README * add pal/audio * deprecate property * support wechat game AudioPlayer * unify minigame interface * optimize module name * support native audio # Conflicts: # @types/jsb.d.ts * add runtime platform * fix module * support build native virtual module update update * update module name * remove jsb-audio.js * revert @rollup/plugin-alias * add quickCompiler field in cc.config.json * fix audio can't stop when paused * fix esLint & ci * fix ci update * update ccConfigJson * add NOTE * readonly maxAudioChannel * add description for interface OneShotAudio * volume range * range for seeking * loadNative return Promise<unknown> * remove quickCompile field in cc.config.json Co-authored-by: pandamicro <lphuabin@gmail.com> Co-authored-by: Jare Guo <jareguo@users.noreply.github.com>
46 lines
989 B
TypeScript
46 lines
989 B
TypeScript
|
|
jest.mock(
|
|
'internal:constants',
|
|
() => jest.requireActual('../cocos/core/default-constants'),
|
|
{ virtual: true, },
|
|
);
|
|
|
|
jest.mock(
|
|
'pal/audio',
|
|
() => jest.requireActual('../pal/audio/web/player'),
|
|
{ virtual: true, },
|
|
);
|
|
|
|
jest.mock(
|
|
'pal/minigame',
|
|
() => jest.requireActual('../pal/minigame/non-minigame'),
|
|
{ virtual: true, },
|
|
);
|
|
|
|
jest.mock('../cocos/core/platform/debug', () => {
|
|
const result = {
|
|
__esModule: true, // Use it when dealing with esModules
|
|
...jest.requireActual('../cocos/core/platform/debug'),
|
|
};
|
|
if (result.warnID) {
|
|
result.warnID = jest.fn();
|
|
}
|
|
return result;
|
|
});
|
|
|
|
import '../exports/base';
|
|
import { DebugMode } from "../cocos/core/platform/debug";
|
|
|
|
|
|
cc.game._initConfig({
|
|
debugMode: DebugMode.INFO,
|
|
});
|
|
// cc.game.init({
|
|
// debugMode: DebugMode.INFO,
|
|
// adapter: {
|
|
// canvas: document.createElement('canvas'),
|
|
// frame: {},
|
|
// container: {}
|
|
// }
|
|
// });
|