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

Brace style breaks "Show Code" #98

Closed
NemoStein opened this issue Dec 12, 2016 · 4 comments
Closed

Brace style breaks "Show Code" #98

NemoStein opened this issue Dec 12, 2016 · 4 comments
Labels

Comments

@NemoStein
Copy link

I put my braces on it's own line but Mochawesome doesn't seem to like my coding habits...

E.g.:

describe('example', function()
{
	it('brace in a new line', function()
	{
		true.should.be.true();
	});
	
	it('brace in the same line', function(){
		true.should.be.true();
	});
});

mochawesome

@adamgruber
Copy link
Owner

Looks like this has to do with the regex that is used to clean the code for output. I'll have to look a little more into it.

@adamgruber adamgruber added the bug label Dec 13, 2016
@NemoStein
Copy link
Author

NemoStein commented Feb 6, 2017

This bug persists in Mochawesome 2.0

Edit: this issues manifests even with arrow functions, but renders marginally different:

describe('example', function()
{
	it('brace in a new line', () =>
	{
		true.should.be.true();
	});
	
	it('brace in the same line', () => {
		true.should.be.true();
	});
});

image

@adamgruber
Copy link
Owner

Fixed in 2.0.4. Let me know if you still have issues.

@NemoStein
Copy link
Author

Working like a charm, thanks! =D

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

No branches or pull requests

2 participants