mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Port the unit tests from https://github.com/vercel/nft/tree/941be1cb3b9d38fbc99a8a6f07af568a64ed0f12/test/unit
17 lines
354 B
JavaScript
17 lines
354 B
JavaScript
const fs = require('fs')
|
|
|
|
const FILES = ['../lib/a.js', '../lib/b.js'].map(function (file) {
|
|
return require.resolve(file)
|
|
})
|
|
|
|
new Function(
|
|
'module',
|
|
(function () {
|
|
var code = FILES.map(function (file) {
|
|
return fs.readFileSync(file, 'utf8')
|
|
})
|
|
code.push('module.exports = evaluate;')
|
|
return code.join('\n\n')
|
|
})()
|
|
)(module)
|