-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace mocha junit reports with our own (#275)
* feat: replace mocha junit reports with our own * fix: stop passing around wrong types * deps: bump @saucelabs/cypress-plugin@3.1.3 * allow report generation on failure * refactor: remove obsolete reporter * refactor: remove unused exports * refactor: remove unnecessary wrapper * build: allow jest to pass without tests * deps: remove obsolete mocha-junit-reporter
- Loading branch information
1 parent
f33c7f1
commit c18532b
Showing
10 changed files
with
170 additions
and
1,110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
#!/usr/bin/env node | ||
|
||
const { cypressRecorder } = require('../lib/cypress-recorder'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const stream = require('stream'); | ||
const childProcess = require('child_process'); | ||
|
||
(async () => await cypressRecorder())(); | ||
const fd = fs.openSync( | ||
path.join(process.cwd(), 'console.log'), | ||
'w+', | ||
0o644 | ||
); | ||
const ws = new stream.Writable({ | ||
write (data, encoding, cb) { | ||
fs.write(fd, data, undefined, encoding, cb); | ||
} | ||
}); | ||
|
||
const [nodeBin] = process.argv; | ||
const child = childProcess.spawn(nodeBin, [ | ||
path.join(__dirname, 'lib', 'cypress-runner.js'), | ||
...process.argv.slice(2) | ||
]); | ||
|
||
child.stdout.pipe(process.stdout); | ||
child.stderr.pipe(process.stderr); | ||
child.stdout.pipe(ws); | ||
child.stderr.pipe(ws); | ||
|
||
child.on('exit', (exitCode) => { | ||
fs.closeSync(fd); | ||
process.exit(exitCode); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.