https://github.com/kinson/salvo
Kinvey integration test framework
https://github.com/kinson/salvo
Last synced: 3 months ago
JSON representation
Kinvey integration test framework
- Host: GitHub
- URL: https://github.com/kinson/salvo
- Owner: kinson
- Created: 2017-11-15T20:04:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T20:42:01.000Z (over 6 years ago)
- Last Synced: 2025-01-16T09:08:52.714Z (4 months ago)
- Language: JavaScript
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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```js
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();
});
});
});
```