(path, callback)
| 39 | let mtime = 32; |
| 40 | const size = 42; |
| 41 | const stat = (path, callback) => { |
| 42 | setTimeout( |
| 43 | () => |
| 44 | callback(null, { |
| 45 | isDirectory() { |
| 46 | return slash(path).endsWith('/directory'); |
| 47 | }, |
| 48 | isSymbolicLink() { |
| 49 | return slash(path).endsWith('symlink'); |
| 50 | }, |
| 51 | mtime: { |
| 52 | getTime() { |
| 53 | return mtime++; |
| 54 | }, |
| 55 | }, |
| 56 | size, |
| 57 | }), |
| 58 | 0, |
| 59 | ); |
| 60 | }; |
| 61 | return { |
| 62 | lstat: jest.fn(stat), |
| 63 | readdir: jest.fn((dir, options, callback) => { |