mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix gentests.js
This commit is contained in:
parent
03ff8a7cfa
commit
bbc0d6f48d
@ -1,4 +1,5 @@
|
|||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
const async = require('async')
|
const async = require('async')
|
||||||
const promisify = require('pify')
|
const promisify = require('pify')
|
||||||
|
|
||||||
@ -58,12 +59,12 @@ async function startContainer (fileRegEx, testGenerator) {
|
|||||||
const testFilePath = sPath.replace('.', '-').replace('.', '.test.')
|
const testFilePath = sPath.replace('.', '-').replace('.', '.test.')
|
||||||
|
|
||||||
await promisify(fs.readFile)(
|
await promisify(fs.readFile)(
|
||||||
__dirname + '/' + sFile,
|
path.join(__dirname, sFile),
|
||||||
'utf8',
|
'utf8',
|
||||||
async (err, result) => {
|
async (err, result) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('Error: ', err)
|
console.log('Error: ', err)
|
||||||
} else {
|
} else {
|
||||||
console.log(`result`, result.length)
|
console.log(`result`, result.length)
|
||||||
const returnObjectStrings = result
|
const returnObjectStrings = result
|
||||||
.match(/return\s(\{[\s\S]+?})\n}/g)
|
.match(/return\s(\{[\s\S]+?})\n}/g)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user