-
Notifications
You must be signed in to change notification settings - Fork 575
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
Testing best practice #616
Comments
Found it. const chai = require('chai');
const chaiHttp = require('chai-http');
const appPromise = require('../server');
let app = null;
const { expect } = chai;
chai.use(chaiHttp);
beforeAll(async () => {
app = await appPromise;
});
describe('Health', () => {
it.skip('should validate health check', async () => {
expect(1).to.equals(1);
// await checkHealth(false);
});
it('should get bricks', async () => {
const res = await chai
.request(app)
.post('/')
.send({ query: '{ feed { id }}' });
expect(res).to.have.status(200);
expect(res.body.data.feed).to.exist;
});
}); |
@Edweis Do you by any chance have an example of how to do a mutation with data? |
|
Hey @Edweis @dunatron @Knautiluz we @the-guild-org are the new maintainers for this project. We are working actively on |
What is the best practice to test
graphql-yoga
server ? I'd like to usechai
testing like in express for instance. Is it possible ?The text was updated successfully, but these errors were encountered: