Skip to content

Commit 5e51a61

Browse files
testing
1 parent 1dd2308 commit 5e51a61

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

package-lock.json

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"mysql": "^2.14.1",
3939
"npm": "^5.3.0",
4040
"pm2": "^2.6.1",
41+
"promise": "^8.0.1",
4142
"randexp": "^0.4.5"
4243
},
4344
"devDependencies": {

tests/test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const request = axios.create({ baseURL: url })
99
//Grab the db variable
1010
import db from '../src/db/db'
1111

12-
// //Before all promosie fix for async/await Jest
13-
// //https://github.com/facebook/jest/issues/1760
14-
// beforeAll(() => {
15-
// global.Promise = require.requireActual('promise');
16-
// });
12+
//Before all promosie fix for async/await Jest
13+
//https://github.com/facebook/jest/issues/1760
14+
beforeAll(() => {
15+
global.Promise = require.requireActual('promise');
16+
});
1717

1818
//After all the tests are done we're going to close our server
1919
//and rollback our database.
@@ -31,7 +31,6 @@ describe('general actions', () => {
3131
expect.assertions(1)
3232
const response = await request.get('/')
3333
expect(response.status).toBe(200)
34-
Promise.resolve()
3534
});
3635
});
3736

0 commit comments

Comments
 (0)