-
-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Create groups.spec.js * Update groups.spec.js * Update getPlugins.spec.js
- Loading branch information
1 parent
0ad7d01
commit 7d5babc
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const database = require('../../../db'); | ||
const groups = require('../../../lib/resolvers/group_query/groups'); | ||
beforeAll(async () => { | ||
require('dotenv').config(); // pull env variables from .env file | ||
await database.connect(); | ||
}); | ||
|
||
afterAll(() => { | ||
database.disconnect(); | ||
}); | ||
|
||
describe('Groups query testing for getting the lib/resolvers/group_query/groups.js', () => { | ||
test('Testing groups Functions', async () => { | ||
//on `groups.js` file we are only returning the data from database which can be some JSON or [] | ||
//so we will just check if it's truthy value or not in the test. | ||
const response = await groups(); | ||
expect(response).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters