Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the test file name be passed in the "suitestart" and "suiteend" callback ? #1399

Closed
muthu90ec opened this issue Jun 20, 2019 · 1 comment

Comments

@muthu90ec
Copy link

Hi,
I have a use case where I want to print the name of the testfile before and after the test run.
For eg: if I have two test files
testFIle1.js
QUnit.test("point1", function(assert){
assert.ok(true);
});

testFile2.js
QUnit.test("point1", function(assert) {
assert.ok(true);
});

when I run qunit.js --reporter=myreporter test*.js ...I want the following printed in the console.

testStart=>filename: testFile1.js
progress: point1 pass
testEnd=>filename: testFile1.js result: pass

testStart=>filename: testFile2.js
progress: point1 pass
testEnd=>filename: testFile2.js result: pass

@Krinkle
Copy link
Member

Krinkle commented Nov 7, 2020

This isn't currently possible in QUnit because our core API is not in charge of loading the script files. That's handled by either the HTML file (via the browser) or by the CLI runner (via Node.js).

Continuing the conversation at qunitjs/js-reporters#111. In particular I'd like to better understand how this helps you and/or other developers. Note that in the event of an issue, we always render the stack trace which includes the file path or URL to the test suites for easy reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants