Skip to content
Kinvey integration test framework
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.env-example
.eslintrc
.gitignore
README.md
index.js
package.json
yarn.lock

README.md

Salvo

A framework for writing end-to-end tests with Kinvey and your MIC provider

Notes:

  • Currently only works with google chrome
  • Test access token is stored locally for 55 minutes before requiring a token refresh

Getting Started

  • There are two basic functions that this library provides, authentication and an abstraction for requests sent to Kinvey service object, an example is provided using Salvo with Jest
const krequest = require('salvo').request;
const kauth = require('salvo').auth;

describe('end to end tests', () => {
  let authString = '';
  beforeAll(done => {
    jasmine.DEFAULT_TIMEOUT_INTERVAL = 25000;
    return kauth('./__tests__/').then(res => {
      authString = res;
      done();
    });
  });

  it('should return app data from Kinvey', done => {
    return krequest(authString).then(res => {
      const result = JSON.parse(res);
      expect(result).toHaveProperty('kinvey', 'hello AppName');
      expect(result).toHaveProperty('appName', 'AppName');
      done();
    });
  });
});
You can’t perform that action at this time.