test-executor
Version:
Executes test scripts in the specified dirs.
23 lines (16 loc) • 384 B
JavaScript
const AsyncObject = require('@cuties/cutie').AsyncObject;
const fs = require('fs');
// Represented result is buffer or string
class ReadDataByPath extends AsyncObject {
constructor(path, options) {
super(path, options || {
encoding: null,
flag: 'r'
});
}
definedAsyncCall() {
return fs.readFile;
}
}
module.exports = ReadDataByPath;