Neovictorian Paisley Menswear
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ee-soa-service-testingpublic

    ee-soa-service-testing

    easy testing for ee-soa services

    installation

    npm install ee-soa-service-testing
    

    build status

    Build Status

    usage

    var env = new TestEnvironment();
    var Request = env.Request;
    
    // add classic orm config
    env.orm(config);
    
    // execute sql on the myDbName db, expects the path to a directory containig
    // sql files whcih should be executed. if therer is a «execution-order.js»
    // file which exports an array all files in the array will be executed
    env.sql('myDbName', __dirname+'/dbSetup');
    
    
    // create a service instance of your service you want to test
    // you may retreive the orm using the orm function
    var service = new MyService({
    	controllerOptions: {
    		orm: env.orm()
    	}
    });
    
    // register the service, you may register as many service as you like
    env.use(service);
    
    // load everything, the callback get executed when everything is loaded
    env.load(function() {
    	// you may start your test when now :)
    	new Request({}).send('myService', function(status, data){
    
    	});
    
    	env.request(new SOARequest(), new SOAResponse());
    });
    

    install

    npm i ee-soa-service-testing

    Downloadslast 7 days

    8

    version

    0.1.6

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar