1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

feat: mocking sas9 responses with JS STP

This commit is contained in:
2022-10-17 18:31:08 +02:00
parent 6434123401
commit 36be3a7d5e
7 changed files with 96 additions and 114 deletions

View File

@@ -110,17 +110,13 @@ export const processProgram = async (
// create a stream that will write to console outputs to log file
const writeStream = fs.createWriteStream(logPath)
// waiting for the open event so that we can have underlying file descriptor
await once(writeStream, 'open')
execFileSync(executablePath, [codePath], {
stdio: ['ignore', writeStream, writeStream]
})
// copy the code file to log and end write stream
writeStream.end(program)
session.completed = true
console.log('session completed', session)
} catch (err: any) {