-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (22 loc) · 682 Bytes
/
Copy pathindex.js
File metadata and controls
24 lines (22 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const fs = require('fs');
const path = require('path');
const otherFunction = require('./other/function')
const subFunction = require('./sub/index')
module.exports = function () {
const data = fs.readFileSync(path.join(__dirname, 'data', 'test.txt'), 'utf8')
const firstDirnameTest = path.join(__dirname, 'data')
const secondDirnameTest = path.join(__dirname, 'other-data')
const firstFilenameTest = __filename
const secondFilenameTest = `${__filename}?query-string=test`
const other = otherFunction()
const sub = subFunction()
return {
data,
firstDirnameTest,
secondDirnameTest,
firstFilenameTest,
secondFilenameTest,
other,
sub,
}
}