Skip to content

Commit 1345341

Browse files
Copilotkobenguyent
andcommitted
Fix runner and sharding tests by moving failing_test.js to correct location
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
1 parent 68dc0bc commit 1345341

File tree

4 files changed

+4
-41
lines changed

4 files changed

+4
-41
lines changed

test/data/sandbox/failed-tests/_output/failed-tests.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
File renamed without changes.

test/data/sandbox/failed-tests/test-failed-tests.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/runner/failed_tests_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ describe('Failed Tests Feature', function () {
1111

1212
afterEach(() => {
1313
try {
14-
fs.unlinkSync(`${codecept_dir}/failed-tests.json`)
14+
fs.unlinkSync(`${codecept_dir}/_output/failed-tests.json`)
1515
} catch (e) {
1616
// continue regardless of error
1717
}
1818
})
1919

2020
it('should save failed tests to JSON file', done => {
2121
exec(`${runner} run --config ${codecept_dir}/codecept.conf.js --save-failed-tests`, (err, stdout) => {
22-
const failedTestsFile = `${codecept_dir}/failed-tests.json`
22+
const failedTestsFile = `${codecept_dir}/_output/failed-tests.json`
2323

2424
// Should have failed tests
2525
assert(err, 'Expected tests to fail')
@@ -49,7 +49,7 @@ describe('Failed Tests Feature', function () {
4949
{
5050
uid: 'should fail test 1',
5151
title: 'should fail test 1',
52-
fullTitle: 'Failed Tests should fail test 1',
52+
fullTitle: 'Failed Tests: should fail test 1',
5353
file: `${codecept_dir}/failed_test.js`,
5454
parent: { title: 'Failed Tests' },
5555
},
@@ -72,7 +72,7 @@ describe('Failed Tests Feature', function () {
7272

7373
it('should work with run-workers command', done => {
7474
exec(`${runner} run-workers 2 --config ${codecept_dir}/codecept.conf.js --save-failed-tests`, (err, stdout) => {
75-
const failedTestsFile = `${codecept_dir}/failed-tests.json`
75+
const failedTestsFile = `${codecept_dir}/_output/failed-tests.json`
7676

7777
// Should have failed tests
7878
assert(err, 'Expected tests to fail')

0 commit comments

Comments
 (0)