96 Commits

Author SHA1 Message Date
Robert Schäfer
6bbc76911a Refactor test cases 2019-01-14 16:07:52 +01:00
Grzegorz Leoniec
fb885ddcda
Merge branch 'master' into 106_authorization 2019-01-13 15:42:21 +01:00
Daksh
ca38892322
remove password from query. 2019-01-10 21:49:01 +05:30
Robert Schäfer
0893d3740e Try to expose bug #106
It does not work as we have PERMISSIONS=disabled also in the server
we're trying to test.
2019-01-09 18:56:57 +01:00
Robert Schäfer
9262fbb44f Start a test server only once.
This keeps our tests small. It is quite a headache though, because of an
issue with jest and with transpiling. For reasons that I don't understand
running `yarn run test:jest` sometimes complains about open handles.
I would love to hear how to make our build more reliable.
2019-01-09 14:49:35 +01:00
Daksh
fbdbabc382
Merge branch 'master' into master 2019-01-09 19:08:37 +05:30
Grzegorz Leoniec
86c7b93386
Removed unneeded log 2019-01-09 13:14:18 +01:00
Grzegorz Leoniec
2571d82447
Disabled cypther logs and added DEBUG env var 2019-01-09 13:12:37 +01:00
Robert Schäfer
ae39c18980 Run all backend tests
I accidently left `describe.only` in the test suite. That usually runs
only one block of tests instead of all tests. My fault, sorry
2019-01-08 14:57:33 +01:00
Robert Schäfer
2156b08e8f Run yarn run lint --fix
@DakshMiglani check the build server for any errors:
https://travis-ci.com/Human-Connection/Nitro-Backend/builds/96505757#L658

Here you can see the build was fine, only eslint complained. Eslint is a
quick fix 😉
2019-01-08 14:20:05 +01:00
Daksh
016119e768
fix variableName from id to userId 2019-01-07 13:00:19 +05:30
Daksh Miglani
5fd5795f39
fix jwt strategy 2019-01-07 12:48:47 +05:30
Robert Schäfer
fd206c2b1f Merge remote-tracking branch 'origin/master' into 500_error_on_login 2019-01-04 00:25:22 +01:00
Robert Schäfer
96d9bb49bc Revert "add afterAll to make CI pass"
This reverts commit 3a9cb31e1f6039aecd428b2fc250b4b88a18ccfa.

See https://github.com/Human-Connection/Nitro-Backend/pull/88#discussion_r245157595
2019-01-03 23:55:05 +01:00
kachulio1
e1070e15f2 add done on async test 2019-01-03 22:03:23 +03:00
kachulio1
3a9cb31e1f add afterAll to make CI pass 2019-01-03 20:40:28 +03:00
Gerald Michelant
4f4b6e5469 changed method to inject variable to login 2019-01-02 14:33:35 -05:00
Gerald Michelant
da1860bcd0 rewritting of login method 2019-01-02 14:33:35 -05:00
Gerald Michelant
57d9088c6c throw new AuthenticationError on password error 2019-01-02 14:33:35 -05:00
Gerald Michelant
0b623cf083 capture error in readable format with try and catch 2019-01-02 14:33:35 -05:00
Robert Schäfer
d98a05a476 Fix eslint 2019-01-02 16:01:25 +01:00
Robert Schäfer
7634234afd Match error message in tests with production code 2019-01-02 15:16:01 +01:00
Robert Schäfer
ffafd72c79 Merge remote-tracking branch 'Gerald1614/500_error_on_login' into 49_fix_no_user_with_that_email 2019-01-02 15:09:13 +01:00
Robert Schäfer
ec5cebf90f DRY code with ES6 2019-01-02 14:56:55 +01:00
Robert Schäfer
70320f3c04 Undo mocks 2019-01-02 14:43:31 +01:00
Robert Schäfer
a0b42d9061 Properly reproduce #49 2019-01-02 13:38:51 +01:00
Robert Schäfer
23b454025a Implement user factory and database clean up 2019-01-02 13:14:28 +01:00
Gerald Michelant
2959eeb931 rewritting of login method 2018-12-30 16:44:08 -05:00
Gerald Michelant
1e949f3fde throw new AuthenticationError on password error 2018-12-28 22:17:28 -05:00
Gerald Michelant
93d821825b capture error in readable format with try and catch 2018-12-27 17:21:18 -05:00
Robert Schäfer
ec9c205bee Export a function in server.js and test teardown 2018-12-21 00:37:58 +01:00
Robert Schäfer
6b216be05c Add @mattwr18's code and fix linting 2018-12-21 00:03:57 +01:00
kachulio1
e58e228f0c remove supertest 2018-12-20 22:44:52 +03:00
kachulio1
2ccbb1ca92 add supertest 2018-12-20 20:39:48 +03:00
Robert Schäfer
f15fb0bb1f Sketch a test to expose #49 2018-12-20 18:01:55 +01:00
Robert Schäfer
eaef67fad3 Replace mocha with jest
To have a consisten test runner in both repos (Nitro-Web and
Nitro-Backend)
2018-12-20 17:55:03 +01:00
Grzegorz Leoniec
e1bbf67c5b
Merge branch 'master' into ci-improvements 2018-12-13 15:49:47 +01:00
Robert Schäfer
c0deb83f24 Merge remote-tracking branch 'origin/master' into admin-tags-and-categories 2018-12-12 01:47:51 +01:00
Grzegorz Leoniec
fb7307caf1
improve tags and categories 2018-12-08 14:01:00 +01:00
Grzegorz Leoniec
034fea3f47
fixing console log issues 2018-12-07 20:30:40 +01:00
Robert Schäfer
ad62a8ebb3 Set unimplemented mocha tests to pending 2018-12-05 00:18:47 +01:00
Robert Schäfer
1ae09b5a7f Merge remote-tracking branch 'origin/master' into mochajs 2018-12-05 00:12:42 +01:00
Robert Schäfer
43b5d8eeb0 Follow @appinteractives review
See:
https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363
https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180950115
2018-12-04 23:43:19 +01:00
Robert Schäfer
71c4ffb012 Merge remote-tracking branch 'origin/master' into mochajs 2018-12-04 21:35:45 +01:00
Robert Schäfer
0fab314b13 Wording: Use reset-db for the file name, too
FYI: @Mastercuber
2018-12-04 01:20:50 +01:00
Robert Schäfer
2ace3e5ce8 Disable eslint for the always-true if-condition
See: https://github.com/Human-Connection/Nitro-Backend/issues/41
2018-12-03 18:28:34 +01:00
Robert Schäfer
15d9178369 Install and configure eslint
Fix all violations but one - there is a mock in our authentication.
2018-12-03 18:05:28 +01:00
Armin Kunkel
b5ce0351c7 Add yarn db:reset script 2018-12-03 15:38:08 +01:00
Grzegorz Leoniec
b3f19694f7 merged master in 2018-11-30 11:45:37 +01:00
Grzegorz Leoniec
ea18ad8e1f merged master in 2018-11-30 10:09:43 +01:00