Skip to content

filefog/filefog-provider-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filefog Provider Tests

A set of integration tests that can be included in you FileFog Provider module and used to test your provider against the current FileFog API.

FileFog Interface Specification

Usage

Write a test runner

i.e. runner.js

/**
 * Test runner dependencies
 */
var mocha = require('mocha');
var TestRunner = require('filefog-provider-tests');


/**
 * Integration Test Runner
 *
 * Uses the `filefog-provider-tests` module to
 * run mocha tests against the specified interfaces
 * of the currently-implemented Filefog API.
 */
new TestRunner({

	// Load the provider module.
	definition: require('./relative/path/to/your/provider'),

	// Each provider will have different requirements, OAuth providers will require client_key's and client_secret
	s, while the local provider only requires a base_directory. Check the [Reference](https://github.com/filefog/filefog-docs/blob/master/provider-specification.md) doc
	for additional interaces, or create your own.
	config: {
        client_key : '777041726477-a5o1tp6f3i9m1me3tj5vhpnrn1jge43c.apps.googleusercontent.com',
        client_secret : 'mWURYHmMKZxr6aeR7DTjRu-q',
        client_scope : "https://www.googleapis.com/auth/drive",
        redirect_url : 'http://localhost:3000/service/callback/google'
     },

	// The set of adapter interfaces to test against.
	interfaces: ["oauth", "events", "webhooks"]
});

Run the tests

$ node runner.js

MIT License

See LICENSE.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published