文件操作 - jest-shim.ts
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/test/jest-shim.ts
编辑文件内容
declare var global: NodeJS.Global; (global as any).requestAnimationFrame = (callback: any) => { setTimeout(callback, 0); }; (Promise.prototype as any).finally = function(onFinally: any) { return this.then( /* onFulfilled */ (res: any) => Promise.resolve(onFinally()).then(() => res), /* onRejected */ (err: any) => Promise.resolve(onFinally()).then(() => { throw err; }) ); };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件