2025-07-25 23:22:02 +08:00
|
|
|
import { readFileSync, writeFileSync as aaa } from 'fs'
|
|
|
|
import * as path from 'path'
|
|
|
|
import * as fs from 'fs'
|
|
|
|
|
2025-08-20 21:48:52 +08:00
|
|
|
function doNothing(obj) {}
|
|
|
|
|
2025-07-25 23:22:02 +08:00
|
|
|
const { writeFileSync = aaa } = {}
|
2025-08-20 21:48:52 +08:00
|
|
|
doNothing({ writeFileSync });
|
2025-07-25 23:22:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
const { writeFileSync = aaa } = {}
|
2025-08-20 21:48:52 +08:00
|
|
|
doNothing({ writeFileSync });
|
2025-07-25 23:22:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
it('should handle external modules with concatenation and caching', () => {
|
|
|
|
expect(typeof readFileSync).toBe('function');
|
|
|
|
const { writeFileSync = aaa } = {}
|
|
|
|
expect(typeof writeFileSync).toBe('function');
|
|
|
|
expect(typeof path.join).toBe('function');
|
|
|
|
});
|
|
|
|
|
2025-08-20 21:48:52 +08:00
|
|
|
export { readFileSync, writeFileSync, path, fs }
|