mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
* (lint) MOB-1063 enforce trailing commas * autofix trailing commas * manually fix newly introduced maxlen violations * add trailing comma convention to i18n build
34 lines
970 B
TypeScript
34 lines
970 B
TypeScript
const mockFs = require( "fs" );
|
|
|
|
module.exports = {
|
|
appendFile: jest.fn( ),
|
|
CachesDirectoryPath: "caches/directory/path",
|
|
DocumentDirectoryPath: "document/directory/path",
|
|
exists: jest.fn( async ( ) => true ),
|
|
moveFile: async ( ) => "testdata",
|
|
copyFile: async ( ) => "testdata",
|
|
copyAssetsFileIOS: async ( ) => "testdata",
|
|
stat: jest.fn( ( ) => ( {
|
|
mtime: new Date(),
|
|
} ) ),
|
|
readFile: jest.fn( ( ) => "testdata" ),
|
|
readDir: jest.fn( async ( ) => ( [
|
|
{
|
|
ctime: new Date(),
|
|
mtime: new Date(),
|
|
name: "testdata",
|
|
},
|
|
] ) ),
|
|
writeFile: jest.fn( async ( filePath, contents, _encoding ) => {
|
|
mockFs.writeFile( filePath, contents, jest.fn( ) );
|
|
} ),
|
|
mkdir: jest.fn( async ( filepath, _options ) => {
|
|
mockFs.mkdir( filepath, jest.fn( ) );
|
|
} ),
|
|
unlink: jest.fn( async ( path = "" ) => {
|
|
if ( !path ) return;
|
|
if ( typeof ( path ) !== "string" ) return;
|
|
mockFs.unlink( path, jest.fn( ) );
|
|
} ),
|
|
};
|