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

unneeded lines in route tests #42

Open
mattlub opened this issue Nov 29, 2018 · 1 comment
Open

unneeded lines in route tests #42

mattlub opened this issue Nov 29, 2018 · 1 comment

Comments

@mattlub
Copy link

mattlub commented Nov 29, 2018

Nice tests in general!

Beauty/src/test.js

Lines 55 to 66 in 9b9fd91

tape('check status code is 200', (t) => {
supertest(router)
.get('/')
.expect(200)
.expect('Content-Type', /html/)
.end((err, res) => {
t.error(err);
t.equal(res.statusCode, 200, 'response should be 200');
t.deepEqual(res.headers['content-type'], 'text/html', 'response should be htmlFile');
t.end();
});
});

in the above snippet, the line:

t.equal(res.statusCode, 200, 'response should be 200');

is not needed, because it is covered by the line:

.expect(200) 

This happens in a couple of your tests.

@Samaamro20
Copy link
Contributor

@mattlub
we fix it , thanks
320ffa4

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

No branches or pull requests

2 participants