Skip to content

Instantly share code, notes, and snippets.

View ORESoftware's full-sized avatar
🏐
Focusing

Alexander Mills ORESoftware

🏐
Focusing
View GitHub Profile
@ORESoftware
ORESoftware / cloudinary-attempts.js
Created December 11, 2015 22:55
Cloudinary Gist
/*
Error that I get for both these attempts:
"Missing required parameter - file"
the image is in a base64 string format...
*/
@ORESoftware
ORESoftware / test-file-1.js
Last active January 4, 2016 01:07
Tudor vs Viking
var viking = require('viking'); //we have published viking on NPM and then installed it in the local project with the --save option
viking.start();
@ORESoftware
ORESoftware / test-file-1.js
Created January 4, 2016 01:08
Viking vs Tudor part I
var viking = require('viking'); //we have published viking on NPM and then installed it in the local project with the --save option
viking.start();
@ORESoftware
ORESoftware / example.js
Last active January 22, 2016 02:03
Example RequireJS synchronous call
define(['require'],function(require){ // 'require' is a reserved dependency keyword in RequireJS
//if we know for sure that some-module is already loaded, then we can load it here synchrounously
//we don't even need to reference it in the dependency array above, if we know it's already loaded
var module = require('some-module');
});
@ORESoftware
ORESoftware / serial-example.js
Last active February 13, 2016 20:32
Suman using serial execution
const assert = require('assert');
const suman = require('suman');
/////////////////////////////////////////////////////
var Test = suman.init(module);
/////////////////////////////////////////////////////
function promiseTimeout(t) {
@ORESoftware
ORESoftware / parallel-example.js
Last active February 13, 2016 20:33
Suman parallel example
const assert = require('assert');
const suman = require('suman');
/////////////////////////////////////////////////////
var Test = suman.init(module);
/////////////////////////////////////////////////////
function promiseTimeout(t) {
@ORESoftware
ORESoftware / simple-example-A.js
Created February 13, 2016 23:59
Suman example one
const assert = require('assert');
const suman = require('suman');
var Test = suman.init(module);
Test.describe('SimpleExampleA', function () {
var config = null;
@ORESoftware
ORESoftware / dependency-injection-A.js
Created February 14, 2016 00:02
Dependency injection with Suman
const assert = require('assert');
const suman = require('suman');
const Test = suman.init(module,'suman.conf.js'); //we now utilize a suman config file which is useful for configuring reporting, IoC, etc
Test.describe('SecondExample', ['delay', 'db', 'val'], function(delay, db, val){ // normally we only need to inject a couple of values per test
var results = [];
@ORESoftware
ORESoftware / dependency-injection-B.js
Created February 14, 2016 00:18
Dependency injection with Suman
const assert = require('assert');
const suman = require('suman');
const Test = suman.init(module,'suman.conf.js'); //we now utilize a suman config file which is useful for configuring reporting, IoC, etc
Test.describe('SecondExample', function(db, server, request){ // normally we only need to inject a couple of values per test, and we don't really need the dependency array
assert(server.isListening); // values are injected asynchronously, so we are already ready to go
assert(db.isConnected); // values are injected asynchronously, so we are already ready to go
@ORESoftware
ORESoftware / suman.ioc.js
Last active February 14, 2016 01:18
Dependency injection for Suman example
//use your own version of this file at the root of your project to configure dependency injection
module.exports = (suman) => { //load async deps for any of your suman tests
suman.configure({
'request': function () {