Giter Site home page Giter Site logo

mfix22 / gest Goto Github PK

View Code? Open in Web Editor NEW
145.0 4.0 2.0 1.32 MB

๐Ÿ‘จโ€๐Ÿ’ป A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud

License: MIT License

JavaScript 100.00%
graphql cli graphql-client command-line gest testing testing-tools jest integration-testing deployment-testing

gest's People

Contributors

briandennis avatar dependabot[bot] avatar mfix22 avatar repo-ranger[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gest's Issues

correctURL regex does not cope with bare hostnames

I'm trying to use gest to test a GraphQL endpoint that is hosted at: http://api/graphql; that's because this is a docker-compose setup, which uses bare service names to access other containers.

This fails due to the regex at

if (/(https?:\/\/)[\w-]+(\.[a-z-]+)+\.?(:\d+)?(\/\S*)?/i.test(url)) return url
which seems to require at least two parts to the hostname (separated by a .).

node js TypeError issue

When i am testing my app....i am getting error "TypeError: Cannot read property 'operation' of undefined". i have used mocha and node both.

this is my code which is in /test/index.js

const should = require('should');

const zapier = require('zapier-platform-core');

const App = require('../index');
const appTester = zapier.createAppTester(App);

describe('My App', () => {

it('should load recipes', (done) => {
const triggerPointer = 'triggers.post';
const bundle = {
// NEW CODE
inputData: {
style: 'mediterranean'
}
};

appTester(App.triggers.post.operation.perform, bundle)
  .then(results => {
    should(results.length).above(1);

    const firstResult = results[0];
    console.log('test result: ', firstResult)
    should(firstResult.name).eql('name 1');
    should(firstResult.directions).eql('directions 1');

    done();
  })
  .catch(done);

});

});
describe('My App', () => {

describe('create recipe create', () => {
it('should create a new recipe', (done) => {
const bundle = {
inputData: {
name: 'Smith Family Recipe',
directions: '1. Order out :)',
authorId: 1
}
};

  appTester(App.creates.calendar.operation.perform, bundle)
    .then((result) => {
     result.should.have.property('name');
      done();
    })
    .catch(done);
});

});
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.